Buffon's Needle

Buffon's Needle

Drop needles on a floor of planks and count how many land across a crack. The answer hides π.

1Drop needles

1
0Needles
0Cross a crack
–Fraction

2The estimate of π

Orange needles cross a crack. Blue ones don't.

3Why π?

Drop a few hundred needles first. Does the fraction that cross settle down? What does it settle near?

4How the computer drops a needle

Each needle gets a random center, anywhere on the floor with every spot equally likely. For its direction, the computer picks a random point in a square around the center and throws it away unless it lands inside the circle that fits in the square; then the needle points toward that point. Every direction is equally likely, and the computer never uses π to aim the needles, so the π that comes out is a real discovery, not one we sneaked in.

The random numbers come from the browser's built-in generator, which produces numbers that pass statistical tests for randomness, though they come from a formula rather than from the physical world.

5About the experiment

Georges-Louis Leclerc, Comte de Buffon, asked this question in 1733 and published the answer in 1777. It was one of the first problems in geometric probability. In 1901 the Italian mathematician Mario Lazzarini reported 3,408 tosses that gave π ≈ 355/113 = 3.1415929, accurate to six decimal places. That result is almost certainly too good to be true: a fair experiment that size would usually miss by around 0.03.