5.7 Monte Carlo variance reduction
Source: Ideas from Computational Physics (Landau, Páez, Bordeianu), §5.7. Rewritten in original wording. Continues 5.6 Mean-value theorem and high-D Monte Carlo. Labs: 5.7b Variance-reduction labs.
When plain sampling wastes effort
Crude Monte Carlo draws uniformly on and averages . That is fine when is smooth and comparable everywhere. It is wasteful when is rapidly varying — for example a narrow Gaussian peak on a wide interval. Most samples land where and barely change the average, while the rare hits near the peak dominate both the estimate and its variance. Raising still helps like , but you are paying for samples that teach you almost nothing.
Control-variate idea
Pick a comparison function that tracks closely,
and whose integral is known exactly:
Then rewrite the target as a small correction plus the known piece:
Estimate only the residual by Monte Carlo:
(with uniform on ; on the factor is ).
Walk the same four equations — each step offers three lookalike formulas:
Goal: shrink the variance
The method pays off when
If mirrors the shape of , the residual is flatter and less noisy under uniform sampling. Exact absorbs the bulk of the integral; Monte Carlo only has to resolve a small leftover. A simple textbook calibration on is with (so ): the control-variate estimate typically beats plain mean-value MC at the same and seed.
Variance reduction
1 / 3Order the control-variate derivation (top = first).
OrderDrag the handle to rearrange — top should be first.
- 1Rewrite I=∫(f−g)+J
- 2MC-average the residual and add known J
- 3Require |f−g|≤ε so g tracks f
- 4Introduce known J=∫g
Drag items into the correct order (or use ↑↓), then check.
Next: 5.7b Variance-reduction labs.