# Central Limit Theorem Simulator - Galton Board, Monte Carlo

> Probability simulations: an animated Galton board vs binomial and normal curves, the central limit theorem, law of large numbers and Monte Carlo π.

- URL: https://qilingtools.com/en/math/clt
- Category: Math Tools (https://qilingtools.com/en/math)
- Tags: [Math](https://qilingtools.com/en/tags/math), [Statistics](https://qilingtools.com/en/tags/statistics), [Education](https://qilingtools.com/en/tags/education)
- Last updated: 2026-10-26
- Price: Free, no sign-up
- Privacy: Runs locally in the browser; files are never uploaded

Four classic statistics experiments in one place, so you can watch the laws of probability at work. Galton board: balls drop through rows of pegs and bounce left or right at each one (with an adjustable probability p of going right); set the rows, the number of balls and the speed and watch the bins fill into a binomial distribution, with the expected counts and the normal approximation overlaid, sample mean and variance compared with np and np(1−p), and a chi-square goodness-of-fit test. Central limit theorem: pick a population — uniform, exponential, bimodal, a die, or a lopsided histogram you draw yourself — choose the sample size n and draw 1, 100, 1,000 or 10,000 samples at a time; the histogram of sample means closes in on the normal curve N(μ, σ²/n), and the standard deviation of the means is compared with the standard error SE = σ/√n. Law of large numbers: run several coin, die or exponential experiments side by side and plot the running average against the number of trials (optionally on a log scale) inside a grey ±2σ/√n funnel. Monte Carlo π: throw darts at a square, estimate π from the share landing in the quarter circle and follow the estimate as it converges. Every experiment uses a seeded random number generator, so the same seed reproduces the same run — handy for teaching.

## How to use

1. Choose the Galton board, central limit theorem, law of large numbers or Monte Carlo π tab
2. Set the parameters (rows and probability, population and sample size, experiment type, darts) and a seed if you want reproducible runs
3. Press Start or the Draw / +N buttons and watch the histograms and curves change
4. Compare the sample statistics with theory, the chi-square test or the standard error

## Features

- Animated Galton board with adjustable rows, bias and speed, binomial expectation and normal curve
- Chi-square goodness-of-fit test and mean/variance comparison
- Central limit theorem with 5 populations, including a hand-drawn histogram, and N(μ, σ²/n) overlay
- Standard error SE = σ/√n checked against the simulation
- Law of large numbers with several runs, a ±2σ/√n funnel and log x-axis
- Monte Carlo estimate of π with a convergence chart
- Seeded random number generator for reproducible results

## FAQ

### What does the central limit theorem say?

Take any population with finite variance, draw many samples of size n and compute each sample’s mean. When n is large enough, those means are approximately normally distributed, centred on the population mean μ with standard deviation (the standard error) σ/√n. The population itself can be very lopsided — exponential or bimodal — and in the tool you can watch the histogram turn bell-shaped as n goes from 1 to 30.

### How large does n need to be?

The usual rule of thumb is n ≥ 30, but it depends on the population. A symmetric one like the uniform distribution looks normal by about n = 5, a skewed one like the exponential needs more, and a very skewed population or one with outliers may need hundreds. Try different populations and sample sizes in the tool and see when the histogram matches the red normal curve.

### Why does a Galton board make a bell shape?

Each ball makes an independent left-or-right choice at each of the n rows, and landing in bin k means going right exactly k times, which has the binomial probability C(n,k)pᵏ(1−p)ⁿ⁻ᵏ. The middle bins can be reached by the most paths, so they collect the most balls. With more rows the binomial gets closer to a normal distribution with mean np and variance np(1−p) — a special case of the central limit theorem.

### How is the law of large numbers different from the central limit theorem?

The law of large numbers tells you where things end up: with more trials the sample average gets closer to the expected value. The central limit theorem tells you how it wobbles around that value: the error is roughly normal and shrinks like σ/√n. That’s why one more correct digit from a Monte Carlo method costs about 100 times more trials — you can see it happen in the π experiment.

## Related tools

- [Graphing Calculator](https://qilingtools.com/en/math/graph): Free online function graphing calculator: type sin(x), x^2 or 1/x and see the curve at once, with several functions, parametric and polar curves, PNG export.
- [Scientific Calculator](https://qilingtools.com/en/math/calculator): Free online scientific calculator: type 2*(3+4)^2, sin(pi/6) or log(8,2) and see the answer as you type, with degrees or radians and a history list.
- [Equation Solver](https://qilingtools.com/en/math/equation): Free online equation solver: enter coefficients for linear, quadratic (with discriminant, vertex and complex roots) and cubic equations, plus 2×2 systems.
- [Fraction Calculator](https://qilingtools.com/en/math/fraction): Free online fraction calculator: add, subtract, multiply and divide fractions with automatic reduction, plus fraction ↔ decimal with repeating digits.
- [Percentage Calculator](https://qilingtools.com/en/math/percentage): Free online percentage calculator: X% of Y, X as a percent of Y, increase and decrease, a value after a percentage change and the original behind it.
- [Prime Factorization](https://qilingtools.com/en/math/prime): Free online prime factorization: factor an integer with exponents, list every divisor and their sum, test primality with neighbouring primes, or list a range.
- [GCD and LCM](https://qilingtools.com/en/math/gcd-lcm): Free online GCD and LCM calculator: works with two or more integers, says whether they are coprime, shows each prime factorization and every Euclidean step.
- [Statistics Calculator](https://qilingtools.com/en/math/statistics): Free online statistics calculator: paste a data set for the mean, median, mode, range, quartiles, variance, standard deviation, standard error and outliers.
