eureka
§ A42

Buffon's Needle: Estimating Pi with Geometry

In 1733, Georges-Louis Leclerc, Comte de Buffon, posed a seemingly simple question: if you drop a needle onto a floor made of parallel strips of wood, what is the probability that the needle will cross a line between two strips?

The answer to this question reveals a beautiful and unexpected connection between random geometry and the fundamental mathematical constant $\pi$ (pi).

The Mathematics of the Drop

To understand the math, imagine dropping a needle of length $l$ onto a floor where the parallel lines are spaced a distance $d$ apart. To make things simpler, we assume the needle is shorter than the distance between the lines ($l \le d$).

Using calculus to average all possible angles and positions the needle can land in, we find that the probability $P$ of the needle crossing a line is:

$$ P = \frac{2l}{\pi d} $$

Finding Pi with Probability

This is where things get interesting. We know that probability can also be approximated experimentally. If we randomly drop $N$ needles and count the number of times they cross a line, let's call that $C$, then the probability is roughly $C/N$.

By combining our theoretical formula with our experimental ratio ($P \approx C/N$), we get a way to estimate $\pi$ just by dropping needles:

$$ \pi \approx \frac{2l \cdot N}{d \cdot C} $$

A Classic Monte Carlo Simulation

This experiment is a prime example of a Monte Carlo method. These are techniques that use randomness and repeated sampling to solve deterministic problems.

Because of the law of large numbers, the more needles we drop (as $N$ increases), the closer our estimate of $\pi$ will converge to the true value (3.14159...). Try it out yourself! Visit our interactive Buffon's Needle simulator and watch the approximation improve as thousands of virtual needles fall.