Estimativa de π (Monte Carlo)

Matemática intermediate Grátis
Estimativa de π (Monte Carlo) – Matemática
Estimativa de π (Monte Carlo) – Matemática

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.

piMonte Carloprobabilitysimulation

Como usar esta simulação

O que observar

A física por trás

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.