Interactive demo · Probabilistic Machine Learning: Advanced Topics · Chapter 11

Variance reduction for Monte Carlo

Estimate μ = ∫01 f(x) dx from S function evaluations. Plain Monte Carlo has standard error σ/√S. A control variate uses the baseline b(x) = x (known mean 1/2) with the coefficient estimated from the same draws; its error is smaller by the factor √(1−ρ²). Antithetic estimation averages f(u) and f(1−u) over S/2 draws. Randomised QMC shifts a van der Corput sequence by a random amount modulo 1. Press Run to repeat each estimator many times and compare the spread of its estimates with the exact theory.

Integrand f(x)

Compare plain MC with

Evaluations per estimate S

Repetitions R

Try these

Exact standard errors for plain MC, the ideal control variate (c = c*) and antithetic pairs come from integrals evaluated on a fine grid; the randomised QMC error has no simple formula, so only its simulated spread is shown. The control-variate coefficient is estimated from the sample in each repetition.

In the lecture notes