Code and Gravity

Why does plinko make a bell curve?

Each peg sends the ball left or right with about equal chance. A ball that lands in a middle bin made roughly as many lefts as rights, and there are far more ways to do that than to go all one way, so the middle fills fastest and the pile forms a bell curve.

One peg is a coin flip

When a ball hits a peg it goes left or right. If the peg is level, the two outcomes are about equally likely, like flipping a coin.

Counting the paths

Take a board with 12 rows of pegs. Every ball makes 12 left-or-right choices, so there are 2 to the power 12, which is 4,096, equally likely paths.

To land in the far-left bin, the ball must go left all 12 times. That is exactly 1 path out of 4,096, or about 0.02%. To land in the middle bin, it needs 6 lefts and 6 rights in any order. There are 924 such orders, so about 22.6% of balls end up in the middle bin.

The middle is not favoured by the pegs. It is favoured by arithmetic: more paths lead there.

Why the shape is a bell

Counting paths like this gives the binomial distribution. As the number of rows grows, its shape gets closer and closer to the smooth normal distribution, the bell curve. This is a special case of the central limit theorem: add up many small independent random choices and the total tends to a bell shape.

Why 300 balls look messy at first

The curve is a prediction about the average. With only a few balls the pile looks random. By a few hundred balls the bins settle close to the predicted heights. That is why the video runs until all 300 balls have landed.

Questions

What is a Galton board?
A board of pegs invented by Francis Galton to show how many small random choices add up to a bell-shaped distribution. Plinko is the game-show version of the same idea.
Does the bell curve always appear?
It appears when each choice is independent and the pegs are level. Tilt the board or change the pegs and the pile shifts to one side.

Try it: open in the sandbox →

Sources: Galton board (Wikipedia) · Binomial distribution (Wikipedia) · Central limit theorem (Wikipedia)

By Code and Gravity · 2026-10-23

More to learn