Interactive Pi Estimation (Monte Carlo)

Mathematics Intermediate Free
Interactive Pi Estimation (Monte Carlo) – Mathematics
Interactive Pi Estimation (Monte Carlo) – Mathematics

You can estimate π by throwing darts. This simulation scatters random points over a square containing a quarter circle and counts how many land inside, converging on π as the sample grows.

How to use this simulation

What to look for

The physics behind it

The quarter circle of radius r has area πr²/4 while the enclosing square has area r², so the fraction of uniformly random points landing inside is π/4. Multiplying the hit fraction by four estimates π. Accuracy improves as the square root of the number of samples, so ten thousand points give roughly one extra digit over a hundred.

piMonte Carloprobabilitysimulation