Galton Board: Pegs, Coin Flips and the Bell Curve

Balls bounce down a Blender-built peg board into bins; compare ideal coin flips with real collisions, tilt the board and test the binomial law.

Switch to 2D

Presets

Playback

Parameters

Camera

Layers

Quality

Model check

The science

What is modelled

A Galton board (bean machine) drops balls through a triangle of pegs. At every peg a ball goes left or right, so after n rows the bin it reaches is the number of right-hand steps, a sum of n independent coin flips. Two models are offered. Ideal: every peg is an independent flip with right-hand probability p. Physical: rigid balls fall under gravity and collide with the pegs and the side walls; the randomness comes only from the tiny scatter in the release point (a chaotic amplifier), and a board tilt adds a sideways gravity component.

Equations

  • Binomial law: P(j) = C(n,j) pj (1-p)n-j, mean n p, variance n p (1-p).
  • Normal limit (de Moivre-Laplace): for large n the counts follow N exp(-(j-np)2/2σ2) / (σ√2π) with σ = √(n p q), so the width grows only as √n.
  • Physical model: gravity (g sinα, -g cosα) in the tilted board frame, velocity-Verlet steps of 1/480 s, circle-circle contact with the pegs, the normal speed reversed and scaled by the restitution e, the tangential speed multiplied by the grip factor.
  • Goodness of fit: χ2 = Σ (O-E)2/E over classes pooled to expected counts of at least 5, compared with the 95 % limit from the Wilson-Hilferty approximation.

Simplifications

The physical model is two-dimensional: the ball is a disc with no spin or rolling, balls do not collide with each other, and the restitution and grip values are illustrative, not measured for any real material. Real boards often give a variance different from n p q because successive bounces are not independent (a ball keeps some sideways momentum); the page shows the ratio so you can see when the binomial law is only an approximation. Choosing fewer rows simply hides pegs of the sixteen-row board. The tilt range is an example, not a calibrated apparatus.

Loading model...
Loading Blender model...
Bin counts against the binomial curve
Variance converging to n p q
Spread against number of rows
Made with 🟠 Blender · Three.js