Buffon's Needle Problem

DOWNLOAD Mathematica Notebook BuffonNeedle

Buffon's needle problem asks to find the probability that a needle of length l will land on a line, given a floor with equally spaced parallel lines a distance d apart. The problem was first posed by the French naturalist Buffon in 1733 (Buffon 1733, pp. 43-45), and reproduced with solution by Buffon in 1777 (Buffon 1777, pp. 100-104).

Define the size parameter x by

 x=l/d.
(1)

For a short needle (i.e., one shorter than the distance between two lines, so that x=l/d<1), the probability P(x) that the needle falls on a line is

P(x)=int_0^(2pi)(l|costheta|)/d(dtheta)/(2pi)
(2)
=(2l)/(pid)int_0^(pi/2)costhetadtheta
(3)
=(2l)/(pid)
(4)
=(2x)/pi.
(5)

For x=l/d=1, this therefore becomes

 P(x=1)=2/pi=0.636619...
(6)

(OEIS A060294).

For a long needle (i.e., one longer than the distance between two lines so that x=l/d>1), the probability that it intersects at least one line is the slightly more complicated expression

 P(x)=2/pi(x-sqrt(x^2-1)+sec^(-1)x),
(7)

where (Uspensky 1937, pp. 252 and 258; Kunkel).

BuffonsNeedleProbability

Writing

 P(x)={(2x)/pi   for x<=1; 2/pi(x-sqrt(x^2-1)+sec^(-1)x)   for x>1
(8)

then gives the plot illustrated above. The above can be derived by noting that

 P(x)=int_0^(phi/2)int_(lsinphi/2)f_sf_phidsdphi,
(9)

where

f_s={2/d for 0<=x<=1/2d; 0 for x>1/2d
(10)
f_phi=2/pi
(11)

are the probability functions for the distance s of the needle's midpoint s from the nearest line and the angle phi formed by the needle and the lines, intersection takes place when 0<=s<=(lsinphi)/2, and phi can be restricted to [0,pi/2] by symmetry.

Let N be the number of line crossings by n tosses of a short needle with size parameter x. Then N has a binomial distribution with parameters n and 2x/pi. A point estimator for theta=1/pi is given by

 theta^^=N/(2xn),
(12)

which is both a uniformly minimum variance unbiased estimator and a maximum likelihood estimator (Perlman and Wishura 1975) with variance

 var(theta^^)=theta/(2n)(1/x-2theta),
(13)

which, in the case x=1, gives

 var(theta^^)=(theta^2(1-2theta))/(2thetan).
(14)

The estimator pi^^=1/theta^^ for pi is known as Buffon's estimator and is an asymptotically unbiased estimator given by

 pi^^=(2xn)/N,
(15)

where x=l/d, n is the number of throws, and N is the number of line crossings. It has asymptotic variance

 avar(pi^^)=(pi^2)/(2n)(pi/x-2),
(16)

which, for the case x=1, becomes

avar(pi^^)=(pi^2(1/2pi-1))/n
(17)
 approx (5.6335339)/n
(18)

(OEIS A114598; Mantel 1953; Solomon 1978, p. 7).

BuffonNeedleTosses

The above figure shows the result of 500 tosses of a needle of length parameter x=1/3, where needles crossing a line are shown in red and those missing are shown in green. 107 of the tosses cross a line, giving pi^^=3.116+/-0.073.

BuffonTosses

Several attempts have been made to experimentally determine pi by needle-tossing. pi calculated from five independent series of tosses of a (short) needle are illustrated above for one million tosses in each trial x=1/3. For a discussion of the relevant statistics and a critical analysis of one of the more accurate (and least believable) needle-tossings, see Badger (1994). Uspensky (1937, pp. 112-113) discusses experiments conducted with 2520, 3204, and 5000 trials.

The problem can be extended to a "needle" in the shape of a convex polygon with generalized diameter less than d. The probability that the boundary of the polygon will intersect one of the lines is given by

 P=p/(pid),
(19)

where p is the perimeter of the polygon (Uspensky 1937, p. 253; Solomon 1978, p. 18).

A further generalization obtained by throwing a needle on a board ruled with two sets of perpendicular lines is called the Buffon-Laplace needle problem.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.