Code and Gravity

Will 300 balls make a bell curve?

Plinko balls form a bell curve because each peg is a left-or-right choice, and many small choices add up to a normal distribution.

How it works

Balls drop through a triangle of pegs. At every peg the ball goes left or right, and the bin it lands in depends on how many rights it got. Middle bins are reached by many more paths than the edges, so the pile grows into a bell curve. The same idea is called a Galton board.

Questions

Why is the pile in the middle taller?
There are many more left/right paths that end near the middle than paths that end at an edge. This is the binomial distribution, which approaches a bell curve.
What is a Galton board?
A board of pegs invented by Francis Galton to show how random choices produce a normal distribution. Plinko is the game-show version.
Is this real physics or an animation?
It is a physics simulation. Collisions are computed 60 times per second from gravity, velocity and bounce rules, then drawn. Nothing is hand-animated.
Will it look the same every time?
Yes. Each video uses a fixed random seed, so the same run plays identically every time, on this site and in the video.
Watch on YouTube →

More like this