Menaksir π (Monte Carlo)

Matematika intermediate Gratis
Menaksir π (Monte Carlo) – Matematika
Menaksir π (Monte Carlo) – Matematika

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

Cara memakai simulasi ini

Yang perlu diamati

Fisika di baliknya

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.