← All Labs
INTERACTIVE APPLET · PROBABILITY · CENTRAL LIMIT THEOREM

The Galton Board → Gaussian

Drop a bead onto a triangle of pegs. At every row it bounces left or right — a single coin flip. After a dozen rows its resting bin is the running total of those flips, and where any one bead lands is pure chance. Yet pour thousands of beads through the same pins and an eerie, smooth bell curve assembles itself in the bins below — the very same curve every time. This is the Central Limit Theorem made of falling marbles: sum enough independent coin flips and the histogram of totals is always the normal distribution. Set the rows and the bias, run the physics, and watch the binomial converge to the Gaussian.

bin count k ~ Binomial(n, p) → Normal(np, np(1−p))

The bean machine — coin flips stack into a bell

Each row is one left/right flip · a bead's bin is the sum · the histogram is the distribution
p5.js · live peg physics

DRIVE IT

Bead (one path = a sequence of flips) Peg (a fair-ish coin flip) Live histogram of landing bins Exact binomial / normal overlay
Press Pour to release a stream. Each bead makes an independent choice at every peg; the pile in each bin is a probability, drawn one marble at a time.
BEADS DROPPED
building the histogram from coin flips
0

CLASSIC SETUPS

WALKTHROUGH

  1. Start on the Fair · 12 rows preset and hit Pour. Follow a single bead: at each peg it darts left or right — a coin flip. Its final bin is just how many rights it happened to take.
  2. Let the stream run. No single bead is predictable, yet the bins fill into a symmetric mound centred on the middle. Switch to mode to watch the histogram grow bar by bar.
  3. Hit Burst 2,000. The jagged bars snap tight against the smooth red bell — the histogram is the distribution once you have enough samples.
  4. Open mode . The blue dots are the exact binomial probabilities \(\binom{n}{k}p^k(1-p)^{n-k}\); the red curve is the normal approximation. Even at n=12 they nearly coincide.
  5. Now drag rows down to 6: the binomial dots and the smooth curve visibly disagree. Drag rows up to 20 and they lock together — that convergence is the CLT arriving.

AHA

THE INSIGHT
A bead's bin is a sum of n independent ±1 coin flips. The bell isn't painted onto the board — it emerges because there are vastly more ways to score "about half rights" than to score all-left or all-right. Add up enough independent random nudges of any shape and their total is always Gaussian. That inevitability is the Central Limit Theorem, and the pegboard is its proof by marble.

RESEARCH NOTE

The bin index \(k\) counts rights in \(n\) flips, so \(k\sim\mathrm{Binomial}(n,p)\) with mean \(np\) and variance \(np(1-p)\). De Moivre (1733) and Laplace showed this binomial tends to the normal law — the first Central Limit Theorem. Further reading: Francis Galton's 1889 Natural Inheritance (he built the physical "quincunx"); de Moivre's Doctrine of Chances; the Lindeberg–Lévy CLT for the general statement.

EXPLANATION

A Galton board — Galton's own "quincunx" — is a vertical grid of pegs arranged in a triangle, with collecting bins along the bottom. A bead dropped at the top strikes the first peg and rolls off to one side; it strikes a peg in the next row and again goes left or right; and so on down through n rows. Model each deflection as a coin flip that lands right with probability \(p\) and left with probability \(1-p\). If we let a right count as \(+1\) and a left as \(0\), then the bin the bead lands in is simply \(k=\) the number of rights it took, an integer from \(0\) to \(n\).

Because the flips are independent and identical, the count \(k\) follows the binomial distribution: \(P(k)=\binom{n}{k}p^{k}(1-p)^{n-k}\). The binomial coefficient \(\binom{n}{k}\) is doing the real work — it counts how many distinct left/right paths arrive at bin \(k\). There is exactly one all-left path (bin 0) and one all-right path (bin \(n\)), but there are hundreds of interleaved paths that end up near the middle. The bins aren't equally likely because the middle bins are reachable in far more ways. That combinatorial lopsidedness is the entire source of the mound shape.

Now the miracle. The mean of \(k\) is \(\mu=np\) and its variance is \(\sigma^{2}=np(1-p)\). As the number of rows \(n\) grows, de Moivre and Laplace proved the discrete binomial bars settle onto a continuous curve, \(P(k)\approx \frac{1}{\sqrt{2\pi\sigma^{2}}}\exp\!\big(-\frac{(k-\mu)^{2}}{2\sigma^{2}}\big)\) — the Gaussian, the bell curve. This is the original Central Limit Theorem, and the modern CLT generalizes it enormously: the sum of many independent random contributions tends to a normal distribution regardless of what each individual contribution looks like. The pegs could be biased, the steps could be unequal — sum enough of them and the histogram of totals is still a bell.

This is why the normal distribution is everywhere in nature and measurement. Heights, measurement errors, thermal noise, the totals of many small independent effects — each is a "sum of coin flips" in disguise, and each inherits the bell. The board also makes two subtler lessons tangible. First, bias shifts but does not break the curve: set \(p=0.7\) and the whole mound slides right to centre on \(np\), still bell-shaped, just narrower (variance \(np(1-p)\) is largest at \(p=0.5\)). Second, spread grows like \(\sqrt{n}\), not \(n\): double the rows and the pile widens by only about \(\sqrt2\), because the standard deviation is \(\sqrt{np(1-p)}\). Randomness accumulates, but it accumulates slowly and predictably — a preview of the \(\sqrt n\) law that governs diffusion and random walks.