Vistat

a reproducible gallery of statistical graphics

The Bean Machine and the Central Limit Theorem

  • Lijia Yu (yu@lijiayu.net / GitHub / Twitter) A master candidate majoring in Bioinformatics at Beijing Institute of Genomics.

The bean machine, also known as the quincunx or Galton box, is a device invented by Sir Francis Galton to demonstrate the Central Limit Theorem, in particular that the Normal distribution is approximated from the Binomial distribution, or properly speaking, de Moivre–Laplace theorem.

The function quincunx() in the animation package shows you how balls bounce left and right as they hit the pins. You can see the height of ball columns in the bins approximates a bell curve.

library(animation)
ani.options(interval = 0.03, nmax = 213)
quincunx()

Meta

Keywords: Categories: Reviewer: You can find the R Markdown source document in the vistat repository on GitHub.