The pegs sit on a staggered lattice of n rows whose columns line up exactly with the n+1 bins, so a ball deflected right j times lands in bin j and the idealised board realises Bin(n, p). The array spans the full width rather than forming a triangle: the outer edge of a triangle has no peg on its far side, and a ball that once starts drifting outwards rides that edge all the way down instead of being turned back.
Tilting the board by α leaves gravity vertical but slants every peg row, so the ball rolls off each peg downhill more often than uphill. Nothing much happens below about 5°: the direction a ball leaves a peg is decided by its incoming velocity and by the roughness, and the tilt has to compete with both. From there the bias climbs quickly. It is a consequence of the mechanics rather than an imposed parameter, so p is estimated from the data as the sample mean divided by n.
Randomness enters through three channels only: the release jitter at the hopper, the roughness of the pegs, and collisions between balls. Set all three to zero and the board becomes deterministic — every ball traces the same path.
Ball radius matters more than one would guess. A ball much smaller than the gap between pegs threads the array diagonally, keeps its horizontal momentum from row to row and drifts steadily to one side; the walk becomes strongly persistent and the variance several times the binomial one. A ball that nearly fills the gap is stopped at every row, and the deflections come much closer to independent tosses.
The physical board is not exactly a Bernoulli scheme. Successive deflections stay mildly correlated through the carried velocity and spin, a crowded board couples the paths, and the side walls truncate the tails. The excess variance is roughly a fixed amount rather than a fixed proportion, so it shows up most clearly with few rows: at the default settings the standard deviation runs some 5% above the binomial one at n = 12 and nearer 20% at n = 5. For large samples the chi-square statistic duly rejects the fit even though the histogram looks right.
space auto d drop p pause r reset. Clicking the board releases a ball. From the console, galton.batch(2000) runs that many balls one at a time, without rendering and without crowding, and returns the bin counts.