askvity

How Do You Calculate Pi with Sticks?

Published in Mathematical Approximation 1 min read

You can approximate pi using a method called Buffon's Needle problem. It involves dropping sticks (or needles) randomly onto a surface with parallel lines and using the proportion of sticks that cross a line to estimate pi.

Buffon's Needle Experiment Explained

Here's how the experiment works and the calculation:

  1. Prepare the Surface: Draw a series of parallel lines on a flat surface. The distance between each line should be consistent. Let's call this distance d.

  2. The Sticks: Obtain a collection of identical sticks (or needles). The length of each stick, l, must be less than or equal to the distance between the lines (l <= d).

  3. The Drop: Randomly drop the sticks onto the surface. Ensure that each stick's position and orientation are completely random.

  4. Count the Crosses: Count the number of sticks that land so that they cross one of the parallel lines. Let's call this number c. Also count the total number of sticks you dropped; we'll call that number s.

  5. The Calculation: Estimate pi using the following formula:

    π ≈ (2 l s) / (d * c)

    Where:

    • π is pi.
    • l is the length of each stick.
    • s is the total number of sticks dropped.
    • d is the distance between the parallel lines.
    • c is the number of sticks that cross a line.

Why This Works

The probability of a stick crossing a line can be mathematically derived using probability and integral calculus. This probability is directly related to pi. By performing the experiment many times (dropping a large number of sticks), the experimental result converges toward the theoretical probability, allowing for an approximation of pi.

Example

Let's say you have sticks of length 5 cm (l = 5), and the distance between the lines is 5 cm (d = 5). You drop 1000 sticks (s = 1000) and find that 637 sticks cross a line (c = 637). Then:

π ≈ (2 5 1000) / (5 * 637)
π ≈ 10000 / 3185
π ≈ 3.14

Accuracy

The accuracy of the approximation increases with the number of sticks dropped. The more sticks you drop, the closer the result will be to the actual value of pi.

Related Articles