How to Estimate Pi at the Bar
Here’s a method for estimating Pi that basically requires a dartboard, faith in the relative frequency interpretation of probability, and plenty of time.
Step one, build yourself a dartboard that looks like this:
The area of the circular part of the dart board is:
And the area of the entire square of this dart board is:
Now think about throwing some darts at this board. What’s the probability each dart will land inside the circle? Easy enough — it’s the area of the circle divided by the area of the square, or
Now we have a really simple expression we can use in practice to estimate Pi to whatever precision we need. The process is really simple:
First, throw some darts at the board. Be sure to throw randomly ! You’ll need a uniform distribution of throws for this to work. Next, count the percentage of your dart throws that hit inside the circle. That percentage is Pr(dart in circle) in our above expression. To estimate Pi, just multiply that percentage by four.
The good news is, it really works. And the more darts you throw, the better the estimate will get. To illustrate, here is a simple Python simulation for 10,000 dart throws I put together.
The bad news? It converges to Pi painfully slowly, so don’t use this method if you’re in a hurry. But then again, if you’re already in a barroom throwing darts, you’re probably not in much of a hurry to begin with.