Curiosities · Foundation · 9 min

Estimating π with needles

Random geometry can estimate a constant through a known crossing probability.

WHAT HAPPENS IF…What happens if no needles have crossed yet?
Interactive exploration
Loading the mathematical model…

Connect the picture to the ideaP(crossing)=2ℓπd,0<ℓ≤dP(\text{crossing})=\frac{2\ell}{\pi d},\quad0<\ell\le d

The midpoint distance to the nearest line is uniform on [0,d/2], independent of uniform orientation. A crossing occurs when that distance is at most (ℓ/2)|sinθ|. Averaging the conditional probability over θ gives 2ℓ/(πd). Solving with an empirical crossing fraction gives a noisy estimate of π.

A detail that matters

The short-needle formula does not apply unchanged when ℓ>d.

Keep the connection going

One idea leads to another.

More curiosities ↗