What is it?
Estimate an integral (an expectation) by averaging a function at random points. The error is whatever the dimension, which makes it the only practical method for high-dimensional integrals: rendering, Bayesian statistics, physics, finance.
Why does it exist?
Grid quadrature with points per axis needs evaluations in dimensions — hopeless for the 10-dimensional light paths of a renderer or the million-dimensional posteriors of statistics. Random points do not care about dimension (Ulam and von Neumann, Los Alamos, 1946).
Formulas
- importance sampling
Why does it matter?
Path tracing in films, risk models in finance, particle transport in reactors and MCMC in Bayesian AI are all Monte Carlo.
The mathematics behind it
Monte Carlo estimates as an average of at random points; error in any dimension.
Grid quadrature in dimensions needs points; Monte Carlo's error does not depend on .
Inverse transform sampling: e.g. is exponential with rate .
Monte Carlo estimates expectations by sample averages.
MC error is ; variance reduction (importance sampling, control variates) is the main lever.
Inverse transform sampling: if is uniform on , has distribution .
Monte Carlo error is in any dimension — 100 times more samples for one more digit.
Monte Carlo methods draw samples of continuous random variables to estimate integrals.
Monte Carlo integration is a Riemann-like sum with random sample points instead of a grid.
Importance sampling and inverse-transform sampling are changes of variable in the integral being estimated.
Where is it used?
Computing topics reachable from here, through the chain of ideas that leads to them:
What depends on it
This page has the essentials. A fuller treatment (intuition, formal definition, worked example) is on the way.