Set the # of Needles slider to 1 and click on the green flag. A single needle will appear positioned to show that its length equals the width of the parallel lines. After a short delay, the three needles will appear, each in the random position they fell when tossed onto the grid. Set the # of Needles slider to higher values to approximate the value of Pi. This is another elementary example of the Monte Carlo method.
The foundation of probability theory was established in 1654 through a series of letters between Blaise Pascal and Pierre de Fermat. These letters traded solutions to a gambling problem raised by the Chevalier de Mere. Probability theory grew slowly over time. Approximately one hundred years after Pascal and Fermat solved their gambling problem, Count Buffon analyzed another gambling problem. Surprisingly, his analysis revealed a close connection between the game, involving the dropping of a needle onto a grid of regularly spaced lines, and the number π. This project uses a simple Monte Carlo method to arrive at an EXPERIMENTAL approximation of π. It can be shown that the probability of a thrown needle intersecting a line is 2/π. Let 2/π = #intersects line/#of Needles. Then π =2x(# of Needles)/(Intersects line).