About Phitter and the interactive Galton board

INFO

Sebastián José Herrera Monterrosa

Creator of Phitter. For questions about Phitter, contact:

phitter.email@gmail.comOpen-source Python kernelORCID: 0009-0002-2766-642XPhitter software paper in JOSS

⭐⭐⭐ Hint: Galton Board ⭐⭐⭐

The Galton board, or quincunx, was developed by Francis Galton to illustrate how repeated random decisions produce a distribution. Balls fall through rows of pegs and collect in bins according to their paths.

In the ideal model, each ball moves independently to the right with probability p = 0.5 and to the left with probability 1 − p = 0.5 at every row. A board with n rows gives each ball n decisions. The total number of rightward moves determines its final bin.

Under these assumptions, the number of right turns follows a binomial distribution. Here n is the number of rows and k the number of right turns. The probability of a ball reaching bin k is:

P(X=k)=(nk)pk(1p)nkP(X=k) = \binom{n}{k} p^k (1-p)^{n-k}

From Binomial to the Bell Curve

Increasing the number of balls makes the observed proportions approach the probabilities of the same binomial distribution; it does not change that distribution into a normal one. Increasing the number of rows makes the binomial shape better approximated by a normal curve when both np and n(1 − p) are sufficiently large. For this balanced board, p = 0.5. The approximating normal density is:

f(x)=1σ2πe12(xμσ)2f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2}

For the number of right turns, the binomial mean is μ = np and its variance is σ² = np(1 − p). A normal approximation uses these values while the bins remain discrete. The animation is a physical illustration: collisions and geometry need not reproduce the independent decisions of the ideal model exactly.