Galton BoardBeta
Watch thousands of balls pile up into a normal curve on a Galton board
This tool is a beta version still being stabilized. Please let us know if a result looks off.
- Dropped
- 0
- Mean bin
- – theory –
- Variance
- – theory –
- Chi-square
- – df –
Balls fall from the top center and bounce left or right off a pin in every row. Left or right is never decided by a coin flip per row: the path comes from tiny differences in the drop position, a tiny random sideways nudge at each pin contact (so no ball can balance on a pin), and the chaos of collisions that amplifies them. After n rows, the chance of landing in bin k is close to the binomial C(n,k)/2ⁿ, and as more balls pile up the shape approaches the bell-shaped normal distribution (mean n/2, variance n/4). The lines show the theoretical heights for the number of balls dropped so far. Press or drag on the canvas to drop extra balls from that spot (the two outermost bins catch overflow).
Working…
0.0
It hasn't frozen — the result will appear when the calculation finishes.
About Galton Board
A Galton board drops balls through staggered rows of pins into bins at the bottom. At every row a ball glances off a pin to the left or the right, and after n rows it lands in bin k, where k is the number of rightward bounces. If each bounce is a fair, independent 50/50 choice, the chance of bin k is the binomial C(n,k)/2ⁿ. Francis Galton described the device, which he called the quincunx, with an illustration in Natural Inheritance (1889), using it to show how many small chance effects add up to a bell curve.
This simulation never flips a coin. Balls are moved by a physics engine that handles gravity and collisions with pins, and left or right is decided by tiny differences in the drop position, a tiny random nudge at each pin contact, and the chaos of repeated collisions. That makes the comparison with the binomial an experiment rather than a foregone conclusion: the results tell you whether the bounces really are 50/50 and independent.
From binomial to normal
After n rows the bin number k follows a binomial distribution with mean n/2 and variance n/4. With the default 12 rows, the mean is bin 6 and the standard deviation √3 ≈ 1.73 bins. The central bin has probability C(12,6)/4096 = 924/4096 ≈ 22.6%, while each end bin has 1/4096, so dropping 3,000 balls puts an expected 0.7 balls there.
The central limit theorem says the sum of many small independent steps tends toward a normal distribution. A ball's final position is the sum of n steps of ±½ bin, so the larger n, the closer the pile comes to the normal curve. Switch on both overlay lines and change the row count. With 4 rows the central bin is 0.375 for the binomial against 0.399 for the normal approximation, a gap of over 6%. With 24 rows it is 0.1612 against 0.1629, about 1%.
Experiment 1: bounciness and skipped columns
On a real board a ball does not always drop neatly onto the neighbouring pin in the next row. If it bounces hard it may skip a row or keep sliding the same way for several rows. Then successive choices are no longer independent, and the variance drifts away from n/4. Raise the bounce (restitution) from 0.35 to 0.7, drop 3,000 balls again, and compare the variance readout with theory. Lower it to 0.1 and the balls hug the pins and step down one column at a time, behaving more like the ideal binomial. The exact size of the effect depends on the board layout, so read it off the statistics panel rather than expecting a fixed number.
Experiment 2: where does the randomness come from?
Set drop jitter to 0 and every ball starts at exactly the same point with the same velocity. A spread still appears, for two reasons. Each pin contact adds a very small sideways nudge so that no ball can balance forever on top of a pin, and pin collisions form a chaotic system that amplifies small differences at every row. On a physical board, surface imperfections and air currents play the same role. Deterministic mechanics producing results that look like chance is what keeps Galton's device interesting.
Reading the chi-square value
The tool uses only bins whose expected count is at least 5 and computes χ² = Σ(observed − expected)²/expected. If the balls really follow the binomial, χ² fluctuates around the number of degrees of freedom. For 12 rows and 3,000 balls, bins 1 to 11 qualify, 11 bins in all. Because the total is fixed, one degree of freedom is lost, so there are 10 degrees of freedom, and the tool shows the bin count minus one, 10. At 10 degrees of freedom the 5% critical value is 18.31. A χ² well above that suggests the 50/50 independent model does not fit the current settings.
Galton's two-stage board
Natural Inheritance also shows a variant in which balls are caught part-way down in intermediate compartments and then released to continue. Galton used it to argue that a normal distribution of normal distributions is itself normal, and to explain regression toward the mean between parents and children. You can mimic the first half here: drop balls from an off-centre point by pressing on the canvas, and the pile shifts to that point while keeping the same binomial shape.
Worked examples
Expected pile with the defaults
- Input
12 rows, 3,000 balls- Output
centre bin (6) ≈ 677, bins 5 and 7 ≈ 580 each, bins 0 and 12 ≈ 0.7 each
3,000 × 924/4096 = 676.8 and 3,000 × 792/4096 = 580.1. Mean 6, variance 3. The standard error of the mean is √(3/3000) ≈ 0.03 bins, so a measured mean beyond about 6.1 hints that the board is biased to one side.
How good is the normal approximation?
- Input
Centre-bin probability at 4 / 12 / 24 rows- Output
binomial 0.375 / 0.226 / 0.161, normal 0.399 / 0.230 / 0.163
The normal peak height is 1/(σ√(2π)) with σ = √n/2. The relative error shrinks from about 6% to 2% to 1% as the rows increase.
Chi-square threshold
- Input
12 rows, 3,000 balls, 11 bins used- Output
df = 10, 5% critical value 18.31
With a fair board you would expect χ² near 10 most of the time and above 18.31 only about one run in twenty.
How to use it
- Set the number of pin rows and balls (changing either restarts the drop).
- Adjust bounce and drop jitter and watch the bins fill.
- Compare the binomial and normal overlays and the mean, variance and chi-square against theory.
- Press on the canvas to drop extra balls from any spot.
Frequently asked questions
What are the two outermost bins?
Overflow bins for balls that hit the side walls and escape past the last pins. They have no place in the ideal binomial, so they count toward the mean and variance but are left out of the chi-square.
What happens if I drop balls off-centre?
The centre of the distribution moves to that point. The shape is the same binomial, but near an edge more balls leak into the overflow bin.
What was Galton trying to show?
In Natural Inheritance he argued that traits such as height, being the sum of many small influences, should follow the normal law, and he used the quincunx to make that visible. A two-stage version in the same book illustrates regression toward the mean.
Do more balls always give a better match?
Random scatter in each bin is roughly the square root of its expected count, so relative error shrinks with more balls. A systematic bias, such as skipped columns from high bounce, does not shrink, and with more balls the chi-square exposes it more clearly.
Notes
Each pin contact includes a tiny random nudge so balls cannot balance on a pin. Part of the randomness comes from that rule.
Air drag and a speed cap are included, so balls bounce less than on a typical wooden board.
Sources
- Francis Galton, Natural Inheritance (1889), galton.org facsimile
- NIST/SEMATECH e-Handbook — Binomial distribution
- NIST/SEMATECH e-Handbook — Chi-square goodness-of-fit test
Last reviewed: