Computing Library › Surrogates & Uncertainty
Surrogates & Uncertainty

Control Variates

Control variates reduce Monte Carlo variance by subtracting a correlated quantity whose expectation is known and adding it back.

The trick

To estimate E[Y] with lower variance, find a control variate C with known mean E[C] that correlates with Y. The estimator Y - beta*(C - E[C]) has the same mean as Y but smaller variance when Y and C are correlated. The optimal coefficient beta = Cov(Y,C)/Var(C) minimizes the resulting variance.

Variance reduction achieved

Kronos motion — monte carlo

The variance of the controlled estimator is Var(Y)*(1 - rho^2), where rho is the correlation between Y and C. A control variate correlated at rho = 0.95 removes about 90 percent of the variance, so the payoff grows sharply with correlation.

python
import numpy as np
beta = np.cov(Y, C, bias=True)[0,1] / np.var(C)
est = np.mean(Y - beta * (C - EC))   # EC = known E[C]

Finding a control variate

Multi-fidelity connection

When the control variate's mean is not known exactly but estimated from many cheap samples, the method generalizes to multi-fidelity Monte Carlo, which optimally allocates samples across a cheap control and an expensive target. This is the practical form used when a fast surrogate serves as the control for an expensive simulation.

Cautions

The coefficient beta is estimated from the same samples, introducing a small bias that vanishes as sample size grows; use a pilot sample to estimate beta if strict unbiasedness matters. Control variates only help when a correlated quantity with a known or cheaply estimated mean exists; a weakly correlated control adds computation for little gain.