Quant Memo
Core

Buffon's Needle

An 18th-century puzzle — drop a needle onto lined paper and count how often it crosses a line — that turns into a working, if slow, physical method for estimating pi from probability.

Prerequisites: Geometric Probability Puzzles, The Uniform Distribution

Rule a sheet of paper with parallel lines spaced distance dd apart. Drop a needle of length LdL \le d onto it at a random position and angle. What's the probability the needle crosses one of the lines? The famous, almost eerie answer — the probability involves π\pi — means you can flip this around and estimate π\pi just by dropping needles and counting crossings, no circle or diameter in sight.

Setting up the randomness

Two independent random quantities describe where the needle lands: xx, the distance from the needle's center to the nearest line (uniform between 00 and d/2d/2), and θ\theta, the angle the needle makes with the lines (uniform between 00 and π/2\pi/2 by symmetry — steeper or shallower doesn't matter, only the acute angle to the lines does). Geometrically, the needle crosses the nearest line exactly when its half-length's vertical reach, L2sinθ\tfrac{L}{2}\sin\theta, exceeds the distance xx to that line: the crossing condition is x<L2sinθx < \tfrac{L}{2}\sin\theta.

Turning geometry into a probability

For a fixed angle θ\theta, the chance of crossing is the fraction of the xx-range, [0,d/2][0, d/2], that satisfies x<L2sinθx < \tfrac{L}{2}\sin\theta: that's (L/2)sinθd/2=Lsinθd\dfrac{(L/2)\sin\theta}{d/2} = \dfrac{L\sin\theta}{d}. Averaging this over all equally likely angles θ\theta from 00 to π/2\pi/2 (integrating and dividing by the range) gives the overall crossing probability:

P(cross)=2Lπd.P(\text{cross}) = \frac{2L}{\pi d} .

In plain English: the probability of a crossing is proportional to how long the needle is relative to the line spacing, scaled down by a factor of 2/π2/\pi — and that π\pi enters purely because averaging sinθ\sin\theta over a range of angles brings in circular geometry, even though nothing about the setup looks like a circle.

Worked example: estimating π\pi from a simulated drop count

Suppose L=d=1L = d = 1 (needle length equals line spacing) and you simulate 1,000 drops, observing 637 crossings. Rearranging the formula, π2L(drops)d(crossings)=2×1×10001×6373.14\pi \approx \dfrac{2L \cdot (\text{drops})}{d \cdot (\text{crossings})} = \dfrac{2 \times 1 \times 1000}{1 \times 637} \approx 3.14. That's within 0.05% of the true value of π3.14159\pi\approx3.14159, from nothing more than a crossing count — a genuine, if statistically noisy, Monte Carlo estimator for π\pi, converging slowly (error shrinks like 1/n1/\sqrt{n}) but converging nonetheless.

Worked example: the case L=d/2L = d/2

If the needle is half the line spacing, L=1L=1, d=2d=2: P(cross)=2(1)π(2)=1π0.318P(\text{cross}) = \dfrac{2(1)}{\pi(2)} = \dfrac1\pi \approx 0.318. So a shorter needle relative to the spacing crosses lines less often, exactly as the geometry suggests — it has less reach to cross a line from any given starting position.

lines spaced d apart crosses a line no crossing
Each dropped needle either crosses a ruled line or doesn't — the long-run fraction that cross depends only on needle length, line spacing, and pi.

What this means in practice

Buffon's needle is the historical ancestor of Monte Carlo estimation: instead of computing a quantity directly, you set up a random experiment whose success probability encodes the quantity, then estimate that probability by repeated sampling. That's the exact logic behind pricing path-dependent options or estimating tail risk today — simulate many random scenarios and let the observed frequency stand in for a probability or expectation that's too hard to compute in closed form.

For a needle of length LL dropped on lines spaced dLd\ge L apart, the crossing probability is P=2LπdP = \dfrac{2L}{\pi d}. Because π\pi appears in the formula, counting crossings over many drops gives a working (if slowly converging) Monte Carlo estimate of π\pi.

Related concepts

Practice in interviews

Further reading

  • Feller, An Introduction to Probability Theory, vol. 1, ch. 1
ShareTwitterLinkedIn