askvity

How do you find pi using probability?

Published in Mathematics 3 mins read

You can find pi using probability through experiments like Buffon's Needle or by analyzing random point distributions within geometric shapes. The core idea is to design a scenario where the probability of a certain event occurring is related to pi.

Buffon's Needle Experiment

One classic example is Buffon's Needle experiment. Here's how it works:

  1. Setup: Imagine a floor with parallel lines drawn on it, spaced equally apart. The distance between the lines is equal to the length of a needle you'll be dropping.

  2. The Experiment: Randomly drop the needle onto the floor many times.

  3. The Probability: The probability (P) that the needle will cross one of the lines is:

    P = (2 * Length of needle) / (Distance between lines * pi)

  4. Calculating Pi: Since we set the length of the needle to be the same as the distance between the lines, the formula simplifies to:

    P = 2 / pi

    Therefore, pi ≈ 2 / P

  5. Estimation: After n drops, if h needles cross a line, the estimated probability is P ≈ h / n. Substituting into the formula above:

    pi ≈ 2 * n / h

In essence, you take the number of drops, multiply this by two, then divide by the number of times it crosses the line to approximate pi. The more times you drop the needle, the more accurate your approximation of pi will be.

Another Probabilistic Approach: Points in a Square and Circle

Another method involves generating random points within a square that circumscribes a circle.

  1. Setup: Imagine a square with sides of length 2r, and a circle with radius r perfectly inscribed within it, centered at the square's center.

  2. Random Points: Generate a large number (n) of random points within the square.

  3. Counting Points: Count the number of points (c) that fall inside the circle.

  4. The Probability: The probability (P) that a randomly generated point in the square will also fall within the circle is equal to the ratio of the circle's area to the square's area:

    P = (Area of circle) / (Area of square) = (pi * r2) / (4 * r2) = pi / 4

  5. Calculating Pi: Therefore, pi = 4 * P

  6. Estimation: Estimate the probability (P) based on the random points: P ≈ c / n. Substituting this into the formula gives:

    pi ≈ 4 * (c / n)

Therefore, pi can be approximated by multiplying 4 by the ratio of points inside the circle to the total number of points in the square.

Both these methods demonstrate how a carefully designed probabilistic experiment can be used to estimate the value of pi.

Related Articles