STA102 · Probability simulations

Estimating π with darts

Throw darts uniformly at random at the unit square. The quarter circle has area π/4 and the square has area 1, so the fraction of darts landing inside is close to π/4 — and four times that fraction is an estimate of π.

From the slides: Why should anyone care about chance?.

Darts thrown
0
Inside the quarter circle
0
Estimate of π = 4 × inside / thrown
—
π = 3.14159…
Error
—

inside   outside  (the picture shows the first 20,000 darts)

What to notice