Library · Geometric Probability · Chapter 53

Buffon’s needle

Revised Report an error

Problem 53.1

A plane is ruled with parallel lines at equal spacing dd. A needle of length ℓ≤d\ell \leq d is dropped “at random” on the plane. What is the probability that the needle crosses one of the lines?

Solution. By translation symmetry, the needle’s position is determined by two parameters:

  • yy, the distance from the needle’s centre to the nearest line, uniform on [0,d/2][0, d/2];

  • θ\theta, the angle the needle makes with the lines, uniform on [0,π/2][0, \pi/2] (by symmetry).

The needle crosses the nearest line iff the needle’s centre is within ℓ2sin⁡θ\tfrac{\ell}{2} \sin\theta of that line, i.e., iff y≤ℓ2sin⁡θy \leq \tfrac{\ell}{2} \sin\theta. Hence P(crossing)=1(d/2)(π/2)∫0π/2 ⁣ ⁣∫0ℓsin⁡θ/2dy dθ=4πd∫0π/2ℓsin⁡θ2 dθ.\begin{align*} \mathbb{P}(\text{crossing}) &= \frac{1}{(d/2)(\pi/2)} \int_0^{\pi/2} \!\! \int_0^{\ell \sin\theta / 2} dy \, d\theta \\ &= \frac{4}{\pi d} \int_0^{\pi/2} \frac{\ell \sin\theta}{2} \, d\theta. \end{align*} The integral equals ℓ2⋅[−cos⁡θ]0π/2=ℓ2\tfrac{\ell}{2} \cdot [-\cos\theta]_0^{\pi/2} = \tfrac{\ell}{2}, so P(crossing)=2ℓπd.■\boxed{\mathbb{P}(\text{crossing}) = \frac{2 \ell}{\pi d}.} \qedhere

Buffon raised the franc-carreau coin-on-tiles problem in 1733, which marks the birth of geometric probability; the needle problem itself came later, in the work usually cited from his 1777 Essai d’arithmétique morale. A Monte Carlo consequence: if one tosses a needle many times and computes the empirical crossing frequency ff, then π≈2ℓfd\pi \approx \tfrac{2 \ell}{f d}. Mario Lazzarini reported in 1901 an experiment yielding π≈355/113\pi \approx 355/113, an absurdly good result that is today suspected to have been selected from a larger run of trials.

Buffon’s needle. Crossings (rose) occur when the needle spans a ruled line; non-crossings (copper) do not. The probability 2\ell/(\pi d) gives a Monte Carlo estimator for \pi .
Buffon’s needle. Crossings (rose) occur when the needle spans a ruled line; non-crossings (copper) do not. The probability 2ℓ/(πd)2\ell/(\pi d) gives a Monte Carlo estimator for π\pi.
import numpy as np
L, d, N = 0.8, 1.0, 10**7
theta = np.random.rand(N) * np.pi/2
y = np.random.rand(N) * d/2  # centre to nearest line
p = (y <= L/2 * np.sin(theta)).mean()
print(f"sim: {p:.5f}   exact: {2*L/(np.pi*d):.5f}")
# sim: 0.50946   exact: 0.50930
Report an error on this page

Reports are stored by Netlify. See the privacy note.