buffon-explanation

Celebrates the π Day of the Century
3 – 14 – 15
with a
Buffon "Needle" Demonstration
Step 1. Take a pencil and drop it on the board.
Step 2. Push the appropriate button on our Arduino* counting circuit.
• Record a hit if the pencil touches a line.
• Record a miss if the pencil is not touching a line.
π
≈ 2 ( # of drops ) / ( # of hits )
WHY DOES IT WORK?
The probability of a pencil hitting a line (hits/drops) is 2/π
so each pencil drop is a sample from this distribution.
WAIT, WHY IS THE PROBABILITY OF HITTING A LINE 2/π?
I know, right?!
π is all about circles and there's nothing
circular about this experiment. Turn over to see the math...
(Caution, trigonometry ahead, and even a little calculus!)
* We should have used a Raspberry Pi for this. Duh.
Buffon "Needle" Explanation
D = distance from the
center of the pencil to the
closest line. 0 ≤ D ≤ ½
D
½
½ sin(θ)
½
θ
½
½
θ = angle at which the pencil falls
relative to the lines. 0 ≤ θ ≤ π
In this figure, the pencil misses a line since D > (1/2)sin(θ)
The pencil will hit a line if
D ≤ (1/2)sin(θ)
This will occur when the point (θ, D) is in the shaded region.
D
The distance
from the
center of the
pencil to the
closest line
f(θ) = ½ sin(θ)
½
π
θ
The angle at which the pencil
falls relative to the lines
The area of the shaded region is exactly 1. **
The area of the full rectangle (indicated by a dotted line) is π/2.
Therefore, the probability of hitting a line is 1 / (π/2) = 2/π.
**
∫
0
π
½ sin(θ) dθ = 1
That's a little thing we call calculus
The lines
are 1 pencil
length apart