= Monte Carlo integration
{c}
{title2=$\widehat I_S=S^{-1}\sum_{s=1}^Sh(X_s)$}
To calculate $I=\int h(x)p(x)\,dx$, generate independent $X_s$ with density $p$ and average $h(X_s)$. Integrability gives convergence by the <strong law of large numbers>; finite <variance> gives an unbiased estimate with variance $\operatorname{Var}(h(X))/S$. Applying this to indicators estimates probabilities. Correlated <Markov chain Monte Carlo> samples can also approximate the integral, but their error is determined by the chain's dependence rather than the independent-sample variance formula.
Back to article page