Galton Board
Balls fall through 12 rows of pegs and go left or right at each peg. The bins fill to the bell shape of the binomial distribution.
Francis Galton described this board in his book Natural Inheritance (1889), to show how chance makes order. A ball falls through 12 rows of pegs, and at each peg it goes left or right with the same chance. It ends in bin n when it went right n times. Of the 2^{12} = 4096 paths, \binom{12}{n} = 12!/(n!(12 - n)!) end in bin n , so after B balls the expected count of bin n is m(n) = B\binom{12}{n}/4096 . This is the binomial distribution; it is close to a normal curve, with the mean 6 and the variance 3.
The bars are the counts after B balls, the red line is the expected count, and the orange path is the path of ball B through the pegs. The 700 balls are dropped once, when the document opens. Each choice comes from a fixed sequence of pseudo-random numbers, so the document shows the same balls on every open. Drag B to replay the experiment: with a few balls the bars are far from the curve, and with hundreds they follow it.
JavaScript is required to view the interactive plot.