Monte Carlo Integration
Monte Carlo integration estimates a definite integral by averaging the integrand over random sample points.
1D Case
where is the sample mean over uniformly distributed random points .
Error
The error scales as , regardless of the dimension of the integral.
High-Dimensional Integrals
In dimensions, the estimate is
where is the volume of the integration domain. The error rate is independent of . For , Monte Carlo outperforms deterministic quadrature methods, which suffer from the curse of dimensionality.
Python
Python
Output