Monte Carlo methods (introductory)
Computational and instrumentation physics · Physics
Study notes
Step 1: Estimate π by Monte Carlo: throw N = 10,000 random darts at the unit square [0,1]×[0,1]; count hits inside the quarter circle x²+y² ≤ 1. Step 2: Suppose N_inside = 7853. Then π/4 ≈ 7853/10000 = 0.7853 → π ≈ 3.1412. Step 3: Error estimate: σ ≈ √[p(1−p)/N] for the fraction, p = 0.7853. σ_p = √(0.7853×0.2147/10000) = √(1.686×10⁻⁵) = 0.00411. Step 4: σ_π = 4 × 0.00411 = 0.0164. So π = 3.141 ± 0.016. Step 5: True π = 3.14159 — inside the error bar. To halve the error, quadruple N (1/√N law): 40,000 darts → ±0.008. Result: π ≈ 3.141 ± 0.016 from 10⁴ random darts — randomness computing a deterministic constant.