Buffon’s Needle Experiment (Estimate pi by randomly dropping sticks)
In this article, we will look into Buffon’s Needle Experiment in detail and estimate the value of π.
Buffon’s Needle Problem
- A table is ruled with equidistant parallel lines a D distance apart.
- A needle of length L, where L≤D, is randomly thrown on a table.
- What is the probability that the needle will intersect one of the lines?
Buffon’s Needle Solution
Let us determine the position of the needle:
1. X= Distance from the middle point of the needle to the nearest parallel line
2. θ= Angle between the needle and the projected line of length X
Condition for the needle to intersect a line:
1. hypotenuse of the right angle triangle < half of the length of the needle
Hence,
X varies between 0 and D/2, θ varies between 0 and π/2
X and θ are uniformly distributed over the interval [0, D/2] and [0, π/2] respectively.
Let’s recap uniform distribution PDF,
A random variable is said to be uniformly distributed over the interval (α,β) if its Probability Density Function is constant over range of x which can be mathematically written as,
Since, X is uniformly distributed over the interval 0 to D/2,
Similarly, θ is uniformly distributed over the interval 0 and π/2,
Since X and θ are independent,
Solving for equation (i),
Estimating the value of π
Buffon’s Needle Problem was once a common method of evaluating π using Monte Carlo Simulation. If you want to know more about Monte Carlo Simulation, here is a short blog about it Link.
Now let’s estimate π,
Number of needles dropped = N
Number of needles that cross the line = x
P(needle that crosses the line) is given as P,
Evaluate π using Buffon’s Needle Problem solution,
Here is a sample of Buffon needle simulation.