🎮 InteractiveLevel: Intermediate

Estimating π (Monte Carlo)

Random dice, a fixed ratio

Summary

Throw random points into a unit square. The fraction that land inside the quarter circle approaches π/4. You can calculate π just by rolling dice: a statistical miracle.

In depth

The Monte Carlo method solves hard mathematical problems by random sampling. Estimating π is its simplest example. Random points (x, y) between 0 and 1 fill the unit square evenly. The area of the quarter circle of radius 1 is π/4, and the area of the square is 1. Throw enough points and the ratio inside the circle / total approaches π/4. The accuracy of the method improves as 1/√n, so 100 times the accuracy needs 10,000 times as many points. It looks slow, but for high-dimensional integrals (for example in physics simulations or the pricing of financial derivatives) it is far more efficient than classical methods.

#pi#monte carlo#probability#numerical methods

Rate Estimating π (Monte Carlo)

What did you think of this content? Click the stars to leave your rating.

Not rated yet

Comments

0

Leave a Comment and Rating

Your rating:
5 / 5
Your email address is never published on the site.
Loading comments...