Buffon's Needle: An Analysis and Simulation
mste.illinois.edu
mste.illinois.edu
Consider a straight needle of length L dropped onto lines spaced 1 unit apart. It is clear that the expected number of intersections is proportional to L. If you joined two needles of length L/2 (possibly at an angle) the expected number of intersections is still L, by additivity of expectation (note that we don't need independence). By induction, the shape of the needle doesn't matter, and the expected number of intersections is proportional to L.
We can work out the constant of proportionality by considering a needle shaped like a circle of radius 0.5, which has circumference pi, and is guaranteed to intersect the lines in two places. Therefore
2 = C * pi
and hence C = 2 / piNow for a straight needle of length 1, we can never have more than 1 intersection. Therefore the probability of intersection is the same as the expected number of intersections, which is seen to be
P = (2 / pi) * 1 = 2 / piOne gimmick that people have mentioned is that if you don't choose ahead of time how many trials to do, you can stop the experiment when it looks like the value so far is near what you know pi should be. That allows some people to say "I did 47200 trials and got a pretty good value!", but it doesn't mean that they would have gotten such a good value without choosing when to stop.