Monte Carlo Integration Convergence
What you are seeing: Monte Carlo integration by hit-or-miss sampling. A shape sits in the unit square; uniform random darts are thrown and accumulate continuously. The fraction landing inside the shape estimates its area, which is the integral of the shape's indicator function. The unit square has area 1, so the hit fraction is the area estimate directly.
The estimate is a Binomial proportion, so its standard error shrinks as $1/\sqrt N$: cutting the error by ten needs a hundred times more darts. The convergence panel plots the absolute error against $N$ on log-log axes against the $1/\sqrt N$ reference. Pick a shape (the quarter disk estimates $\pi$, since its area is $\pi/4$) and watch the darts reveal it while the estimate settles.
WHAT TO TRY
- Throw darts and watch the estimate settle: the fraction landing inside the shape times the box area converges on the true integral, with no formula needed.
- Note how slowly it tightens: the error shrinks only as one over the square root of N, so each extra digit costs a hundredfold more darts. Monte Carlo trades precision for dimension-independence.
- Switch shapes: the method does not care whether the region is a circle, a blob, or a high-dimensional volume, which is exactly why it dominates in many dimensions.