Site hosted by Angelfire.com: Build your free website today!



What is Buffon's Needle?


Buffon's Needle refers to a simple Monte Carlo method for the estimation of the value of pi, 3.14159265... The idea is very simple. Suppose you have a tabletop with a number of parallel lines drawn on it, which are equally spaced (say the spacing is 1 inch, for example). Suppose you also have a pin or needle, which is also an inch long. If you drop the needle on the table, you will find that one of two things happens: (1) The needle crosses or touches one of the lines, or (2) the needle crosses no lines. The idea now is to keep dropping this needle over and over on the table, and to record the statistics. Namely, we want to keep track of both the total number of times that the needle is randomly dropped on the table (call this N), and the number of times that it crosses a line (call this C). If you keep dropping the needle, eventually you will find that the number 2N/C approaches the value of pi!

Why does this work? It is not hard to show, with a little bit of calculus, that the probability on any given drop of the needle that it should cross a line is given by 2/pi. After many trials, the value of C/N, the number of crossing needles divided by the total number of needles, will approach the value of the probability.

How to use this applet:

The left hand side shows the tabletop with parallel lines, being covered with needles randomly. Click on "Start" to begin. Note that if you click on "Start," again, it will begin the simulation from scratch. The bar graph in the middle displays the value of the current estimate over a smaller range. When you begin, the estimated value will probably be outside of this range. The plot on the right shows the estimated value versus the log of the number of needles thrown, on a wider scale. The right-most border of the plot corresponds to N=100,000 needles.

The source code

About Buffon:

Georges Louis Leclerc, Comte de Buffon (1707-1788) was a French naturalist and mathematician. Deeply interested in biology, he intuited, lonmg before Darwin, that all living organisms shared a common ancestry. He also questioned the prevailing Biblical accounts of natural history and realized the earth had to be significantly older than previously thought.

Contact me: hurbenm at yahoo.com

Applet failed to run. No Java plug-in was found.