Probability & Statistics

Control Variates

Subtract a centered known-mean control and tune its coefficient to change variance without changing expectation.

By Riano · Published · Updated · Report a correction

Control Variates

Concept Overview

The method of control variates is a variance reduction technique used in Monte Carlo simulations. When we want to estimate the expectation E[f(U)], we can introduce a known-mean control variable U (where E[U] is known) and form a new estimator h_c(U) = f(U) - c(U - E[U]). Because we subtract a term with expectation zero, the expectation of our new estimator remains exactly the same as the original. However, by carefully selecting the coefficient c, we can significantly reduce the variance of the estimation.

Worked Example

Suppose we want to estimate the expectation of f(u) = u^3 where U is uniformly distributed on [0, 1]. We know the exact expectation is E[U^3] = 1/4 = 0.25.

Using U as a control variate, we know E[U] = 1/2 and Var(U) = 1/12. Let's choose a coefficient c = 0.9. The new estimator is:

h_c(U) = U^3 - 0.9(U - 0.5)

If we select a deterministic probe at u = 0.625, the adjusted probe value is:

  1. Calculate f(0.625) = 0.625^3 = 0.244140625
  2. Calculate the control adjustment c(U - 0.5) = 0.9(0.625 - 0.5) = 0.9(0.125) = 0.1125
  3. Subtract to get the probe: 0.244140625 - 0.1125 = 0.131640625

Now let's check the variance reduction. The raw variance is Var(U^3) = 9/112 ≈ 0.080357. The adjusted variance is given by:

Var(h_c) = Var(f(U)) - 2c · Cov(f(U), U) + c^2 Var(U) Var(h_c) = 9/112 - 2(0.9)(3/40) + (0.9^2)(1/12) Var(h_c) = 9/700 ≈ 0.012857

The optimal coefficient is c^* = Cov(U^3, U) / Var(U) = (3/40) / (1/12) = 0.9. By using c = 0.9, we achieved the minimum possible variance for this control variate.

Experimenting with Control Variates

You can interact with these exact scenarios in the module at https://riano.app/module/control-variates.

  1. Change the Function preset to "Cubic" to study f(u) = u^3.
  2. Slide Coefficient tenths to 9 to set c = 0.9. Notice that the adjusted variance drops to its minimum point on the parabola.
  3. Set Probe eighths to 5 to illustrate the selected probe u = 0.625. The adjusted probe becomes exactly 0.131640625.
  4. Now, try shifting the Coefficient tenths to 0. The adjusted variance returns to the raw variance of 0.080357... because no control is applied.
  5. If you slide Coefficient tenths to 20 (c = 2.0), the adjusted variance climbs above the raw variance, demonstrating that a poorly chosen coefficient can increase estimation variance.

Limitations

The primary limitation of control variates is that you must know the exact expectation of the control variable E[U]. Furthermore, to determine the optimal coefficient c^* analytically, you must know the covariance Cov(f(U), U) and the variance Var(U). In complex real-world simulations, these values are rarely known exactly and must be estimated from sample data, which introduces additional noise and potential bias into the calculation.

Additionally, this module focuses strictly on theoretical values and expectations (the "adjusted probe" simply shows one outcome h_c(u)). With a nonzero covariance, the optimal coefficient gives an improvement of Cov(f(U), U)2/Var(U), which can be small when correlation is weak. If covariance is exactly zero, the optimum is c = 0; any nonzero fixed coefficient instead adds c2Var(U) to the variance.

References

Primary sources that describe the derivations, optimality conditions, and pitfalls of control variates:

Experience it interactively

Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Control Variates module.

Try Control Variates on Riano →

More in Probability & Statistics