# how do you derive pi from dropping pins on a grid?

**URL:** <https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259>\
**Category:** Factual Questions\
**Created:** [October 14, 2004, 8:38pm UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259 "2004-10-14T20:38:56Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![CC](https://avatars.discourse-cdn.com/v4/letter/c/f1d935/32.png) [@CC](https://boards.straightdope.com/u/CC)\
**Post date:** [October 14, 2004, 8:38pm UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259/1 "2004-10-14T20:38:56Z")

</div>

Some years ago I came across a method of deriving pi from dropping straight pins on a grid of parallel lines. Today, I came across it again. I don’t know why it works, how it works, or what the possible connection is to round things. What’s the deal with this and what’s the connection to circles? xo C.

---

<div class="post-metadata">

**Author:** ![micco](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@micco](https://boards.straightdope.com/u/micco)\
**Post date:** [October 14, 2004, 8:48pm UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259/2 "2004-10-14T20:48:26Z")

</div>

Take a square with a side length of one and inscribe a circle inside with a radius of one. The area of the square is length times width, or one. The area of the circle is pi times radius squared, or pi. The ratio of the area of the circle over the area of the square is pi/1.

Now drop markers on the square. The ratio of the number of markers that land in the circle to the total number of markers dropped should converge on pi if the drops are randomly distributed over the square. The number converges on pi because that is the proportion of the total area that is inside the circle.

---

<div class="post-metadata">

**Author:** ![Colophon](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Colophon](https://boards.straightdope.com/u/Colophon)\
**Post date:** [October 14, 2004, 8:48pm UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259/3 "2004-10-14T20:48:31Z")

</div>

From [http://www.angelfire.com/wa/hurben/buff.html](http://www.angelfire.com/wa/hurben/buff.html) :

> [@](#):
>
> \*\*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!

Yes, it appears that it does work.

And why does it work? See here: [http://www.mste.uiuc.edu/reese/buffon/buffon.html](http://www.mste.uiuc.edu/reese/buffon/buffon.html)

---

<div class="post-metadata">

**Author:** ![Giles](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/giles/32/60_2.png) [@Giles](https://boards.straightdope.com/u/Giles)\
**Post date:** [October 14, 2004, 8:48pm UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259/4 "2004-10-14T20:48:36Z")

</div>

> [@CC](#):
>
> Some years ago I came across a method of deriving pi from dropping straight pins on a grid of parallel lines. Today, I came across it again. I don’t know why it works, how it works, or what the possible connection is to round things. What’s the deal with this and what’s the connection to circles? xo C.

When you drop a pin, it can fall in any direction. Assuming it falls with its centre in a specific spot, the possible postions for a circle with centre at that spot, and doameter equal to length of the pin. Some parts of that circle will cross the grid of parallel lines, and calculating how much of the circle involves using pi.

---

<div class="post-metadata">

**Author:** ![micco](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@micco](https://boards.straightdope.com/u/micco)\
**Post date:** [October 14, 2004, 8:50pm UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259/5 "2004-10-14T20:50:12Z")

</div>

Sorry, **Colophon** ’s answer made me realize I misread the OP.

---

<div class="post-metadata">

**Author:** ![astro](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@astro](https://boards.straightdope.com/u/astro)\
**Post date:** [October 14, 2004, 8:52pm UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259/6 "2004-10-14T20:52:39Z")

</div>

[This article says that method is a kinda-sorta scam](http://www-gap.dcs.st-and.ac.uk/~history/HistTopics/Pi_through_the_ages.html)

> [@](#):
>
> We should say a little of how the notation p arose. Oughtred in 1647 used the symbol d/p for the ratio of the diameter of a circle to its circumference. David Gregory (1697) used p/r for the ratio of the circumference of a circle to its radius. The first to use p with its present meaning was an Welsh mathematician William Jones in 1706 when he states 3.14159 andc. = p. Euler adopted the symbol in 1737 and it quickly became a standard notation.
> 
> We conclude with one further statistical curiosity about the calculation of p, namely Buffon’s needle experiment. If we have a uniform grid of parallel lines, unit distance apart and if we drop a needle of length k \< 1 on the grid, the probability that the needle falls across a line is 2k/p. Various people have tried to calculate p by throwing needles. The most remarkable result was that of Lazzerini (1901), who made 34080 tosses and got
> 
> p = 355/113 = 3.1415929
> 
> which, incidentally, is the value found by Zu Chongzhi. This outcome is suspiciously good, and the game is given away by the strange number 34080 of tosses. Kendall and Moran comment that a good value can be obtained by stopping the experiment at an optimal moment. If you set in advance how many throws there are to be then this is a very inaccurate way of computing p. Kendall and Moran comment that you would do better to cut out a large circle of wood and use a tape measure to find its circumference and diameter.
> 
> Still on the theme of phoney experiments, Gridgeman, in a paper which pours scorn on Lazzerini and others, created some amusement by using a needle of carefully chosen length k = 0.7857, throwing it twice, and hitting a line once. His estimate for p was thus given by
> 
> 2 0.7857 / p = 1/2
> 
> from which he got the highly creditable value of p = 3.1428. He was not being serious

---

<div class="post-metadata">

**Author:** ![Colophon](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Colophon](https://boards.straightdope.com/u/Colophon)\
**Post date:** [October 14, 2004, 8:53pm UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259/7 "2004-10-14T20:53:29Z")

</div>

> [@micco](#):
>
> Take a square with a side length of one and inscribe a circle inside with a radius of one.

You can’t do that - a circle of radius 1 has a diameter of 2. It wouldn’t fit.  
You need a square of side 2, so the ratio would be pi/4.

> [@](#):
>
> Now drop markers on the square. The ratio of the number of markers that land in the circle to the total number of markers dropped should converge on pi if the drops are randomly distributed over the square. The number converges on pi because that is the proportion of the total area that is inside the circle.

This isn’t quite the same thing as Buffon’s Needle, but the idea is the same I suppose. Anyway, in this case the ratio of the number of markers in the circle to the total would be pi to 4, I think.

---

<div class="post-metadata">

**Author:** ![micco](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@micco](https://boards.straightdope.com/u/micco)\
**Post date:** [October 14, 2004, 9:09pm UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259/8 "2004-10-14T21:09:52Z")

</div>

> [@Colophon](#):
>
> You can’t do that - a circle of radius 1 has a diameter of 2. It wouldn’t fit.  
> You need a square of side 2, so the ratio would be pi/4.

Right, not only was I not responsive to the OP but I got the arithmetic wrong. The area ratio method works as long as you do the areas correctly. I’ll move along now.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [October 14, 2004, 9:31pm UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259/9 "2004-10-14T21:31:57Z")

</div>

> [@astro](#):
>
> [This article says that method is a kinda-sorta scam](http://www-gap.dcs.st-and.ac.uk/~history/HistTopics/Pi_through_the_ages.html)

That’s not what I get out of reading the portion you quoted.

---

<div class="post-metadata">

**Author:** ![astro](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@astro](https://boards.straightdope.com/u/astro)\
**Post date:** [October 15, 2004, 3:09am UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259/10 "2004-10-15T03:09:04Z")

</div>

> [@ultrafilter](#):
>
> That’s not what I get out of reading the portion you quoted.

I thought (obviously incorrectly) that the article was saying that the result was gamed by stopping at a precisely pre-determined point.

> [@](#):
>
> which, incidentally, is the value found by Zu Chongzhi. **This outcome is suspiciously good, and the game is given away by the strange number 34080 of tosses**. Kendall and Moran comment that a good value can be obtained by stopping the experiment at an optimal moment. If you set in advance how many throws there are to be then this is a very inaccurate way of computing p.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 15, 2004, 3:43am UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259/11 "2004-10-15T03:43:32Z")

</div>

That particular experiment is a bit suspect, but the method itself is technically sound. It’s just that it’s wholly impractical for arriving at any sort of precise value, since it would take a great many trials to converge.

---

<div class="post-metadata">

**Author:** ![ITR\_champion](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@ITR\_champion](https://boards.straightdope.com/u/ITR_champion)\
**Post date:** [October 15, 2004, 3:59am UTC](https://boards.straightdope.com/t/how-do-you-derive-pi-from-dropping-pins-on-a-grid/269259/12 "2004-10-15T03:59:56Z")

</div>

To understand why it’s true, you have to grasp the relationship between probability and integral calculus. Draw a graph with the distance _d_ from the head of the needle to the nearest line on one axis; if the lines are two inches apart, this distance will range between zero and one with uniform probability. Then make the other axis the angle _a_ between the needle and the lines, which ranges between zero and ninety degrees. Think of the total area of this graph as the set of all possible outcomes. Then find the region on the graph where the needle will cross the line, in other words where cos(_a_) is greater than _d_. A little calculus shows that the area of this region, divided by the area of the whole graph, gives you the result.
