TL;DR
A Monte Carlo estimate averages random samples, and its error is set by how much the samples scatter. A control variate reduces that scatter by measuring a second quantity, one that moves with the first and whose average is known exactly, and subtracting the known part of the wobble. The estimate stays unbiased, and when the two quantities are strongly correlated the error can shrink several times over with the same number of samples.
Builds on: Monte Carlo Method, Covariance, Correlation Coefficient · Leads to: Importance Sampling
Where it's used
Pricing financial options. An option's payoff depends on a random future price path, and its fair price is an expected value that is usually estimated by simulating many paths. A common trick uses an option whose price has a closed-form formula, such as a version that pays on the geometric average of the price instead of the arithmetic average. The two payoffs are highly correlated across paths, so the known formula removes much of the simulation noise. Kemna and Vorst used this idea for Asian options in 1990.
Survey sampling. A statistics office wants the average income of all households but can afford to interview only a sample. Last year's census gave the true average for every household, and that quantity is correlated with this year's income. Using last year's numbers as a control is the difference and ratio estimator tradition, developed in the mid-twentieth century for sample surveys.
Physics and engineering simulation. When a simulation is expensive, a cheap approximate model of the same system often correlates with the expensive one. Its mean is computed exactly or with many cheap runs, and it serves as the control. Each expensive run then needs fewer repetitions to reach a target error.
How it works
Suppose we want the average of , and we can only learn about by drawing random samples. Now suppose there is a second quantity that comes from the same draw, has a mean we know exactly, and tends to be high when is high. Here is one pass of the estimator on four samples, traced from start to finish. The known mean is .
-
Draw four pairs . The samples are , , , and . Check: each row has one and one , and both come from the same random draw.
-
Average the plain way. . Check: this is the standard Monte Carlo estimate, and it is unbiased.
-
Compare the sample of with its known mean. , but the true mean is 0.5. The sample happened to draw too many cases. Those cases come with higher values, so the plain average of is probably too high. Check: the gap is the sign of the error we want to remove.
-
Subtract the known part of the gap. Pick a number and form . Check: the correction moved the estimate down, in the direction the gap suggested.
-
Confirm that the correction does not bias the answer. The average of over many repeats is zero, because is unbiased for and the law of large numbers makes repeated averages settle on the mean. So the expected value of is still the true average of , whatever is. Check: a different changes the noise, not the target.
-
Choose to make the noise as small as possible. The best depends on how strongly and move together, and the next section gives the formula. The result is an average whose scatter is smaller than the plain average's, for the same number of samples.
The diagram shows the same flow.
flowchart LR A[Draw samples of Z and Y together] --> B[Average Y: plain estimate] A --> C[Average Z and compare with its known mean] B --> D[Subtract c times the gap] C --> D D --> E[Unbiased estimate with less scatter]
How much help the control gives depends on the correlation. The plot shows, as a function of the correlation between and , the factor by which the variance is multiplied (solid) and the factor for the standard error (dashed).
- variance factor
- standard error factor
The math
Let and be paired samples, each pair drawn from the same random experiment, with expected value unknown and known. For a constant , the control variate estimator is
The number is the coefficient, and is the control.
In words: is the plain average, is the average of the control, and the estimate adds back a multiple of the control's sampling error.
Step 1 in symbols: the estimate is unbiased
Since , the term has expected value zero. Therefore
This holds for every , which is why the choice of affects only the noise.
Step 2 in symbols: the variance
Rewrite the estimate as one average, then take its variance, which involves the covariance of and : . The term is a constant, so
This is a quadratic in , so it has one smallest value.
Step 3 in symbols: the best coefficient
Set the derivative with respect to to zero: , so
This is the slope of the regression of on . Substituting back, and writing for the correlation coefficient between and , the smallest variance is
The factor is the whole story: the closer is to or , the more of the noise is removed. The sign of does not matter, because takes the sign it needs.
Step 4 in symbols: estimating from data
In practice and are estimated from the same samples. This adds a small bias that shrinks as , and it is ignored in most applications with many samples. Estimating from a separate pilot run avoids the issue.
Worked examples
Take and the pairs : , , , . The known mean is , and we use .
- Average the values: .
- Average the values: .
- Gap from the known mean: .
- Correction: .
- Estimate: .
Interpretation: the sample had more cases than expected, and those carry high values, so the plain average of 0.65 was pushed up. The estimate moves to 0.40. With this is not the best choice of , but the estimate is still unbiased.
Let , , and . Then .
- Best coefficient: .
- Plain variance per sample: .
- Controlled variance per sample: .
- Check with the formula: . The two agree.
- With samples, the plain standard error is , and the controlled one is .
Interpretation: the same 1000 draws give an estimate less than half as noisy. Equivalently, the plain method would need about times as many samples to match the controlled estimate.
A city wants the mean monthly electricity use, in kWh, of all its households. The census of last year gives a true mean of 300 kWh for last year's use, so . A sample of households this year gives kWh and last year's sample mean kWh. Both standard deviations are about 100 kWh, and the correlation between this year's and last year's use across households is about .
- The gap is . The sample used a little less electricity last year than the city as a whole.
- Best coefficient: .
- Adjusted estimate: kWh.
- Plain standard error: kWh.
- Adjusted standard error: kWh.
Interpretation: the sample looked low on last year's use, which suggests it was also low this year, so the estimate moves up to 328. The margin of error drops from about 5 to about 3 kWh for the same survey.
Try it: suppose the correlation were only , with everything else the same. Compute the adjusted standard error. Answer: kWh, still better than 5 kWh but a much smaller gain.
Common mistakes and tradeoffs
It is tempting to think that subtracting something makes the estimate biased. In fact the control has known mean, so its sampling error averages to zero, and is unbiased for every . The only cost is the small bias from estimating on the same data, which shrinks with .
It is tempting to think any correlated variable helps. In fact the gain is the factor , so a control with near zero does almost nothing. A control with a strong negative correlation helps just as much, because becomes negative.
It is tempting to think the control only needs a rough mean. In fact the method needs the control's mean to be known exactly. If you estimate from the same samples, most of the variance reduction disappears, so the control must come from a formula or a much larger independent computation.
When to use it: you have a cheap quantity that tracks the one you want, with a mean you know exactly, and the correlation is high. It is the standard first tool when a plain Monte Carlo estimate is too noisy.
When not to use it: no such control exists, the correlation is weak, or computing the control costs about as much as the samples you were trying to save.
| Technique | Idea | Strength | Weakness |
|---|---|---|---|
| Control variate | Subtract a correlated known-mean quantity | Unbiased, often large gains | Needs a good control with exact mean |
| Importance sampling | Sample from a different distribution and reweight | Focuses effort on rare, important outcomes | Weights can become huge |
| Antithetic variates | Pair each draw with its mirror image | Simple, no extra model | Gains depend on monotone behaviour |
| Stratified sampling | Split the range and sample each part | Removes between-part variation | Needs a way to split the range |
History
The Monte Carlo method took shape at Los Alamos in the 1940s, when Stanislaw Ulam and John von Neumann proposed estimating quantities by random sampling and the computers of the day made it practical. Early users quickly needed ways to make estimates less noisy with a fixed budget of runs.
The control idea is older than the computer. Survey statisticians used auxiliary information, such as last census's totals, through ratio and difference estimators, and William Cochran's 1953 textbook Sampling Techniques is a standard reference for them. Simulation specialists later adopted the same estimator for random experiments. It caught on in finance in the 1990s, when pricing exotic options by simulation became routine and a closed-form control was often available.
Recap
- A Monte Carlo average has noise set by the spread of its samples, and the usual standard error shrinks like one over the square root of the sample count.
- A control variate is a quantity drawn alongside whose mean is known exactly.
- The estimate stays unbiased for every .
- The best is , which yields variance .
- Strong correlation with a known-mean control is what makes the method pay off.
Read next: Importance Sampling, which reduces variance in a different way by changing the distribution you sample from.
Check yourself
QuestionWhat property must a control variate Z have for the estimate Y-bar minus c times (Z-bar minus mu_Z) to stay unbiased?Show answer
Its mean must be known exactly. Then for every sample size, so the correction has zero expected value and the estimate is unbiased for any choice of .
QuestionY has variance 9, Z has variance 4, and Cov(Y, Z) = 3. What is the best coefficient c, and what fraction of the plain variance remains?Show answer
The best coefficient is . The correlation is , so the remaining fraction is . Check: .
QuestionWhy does the sign of the correlation not matter for the size of the gain, even though it matters for the sign of c?Show answer
The gain depends on , which is the same for a positive and a negative correlation. The coefficient takes the sign that lines the correction up with the error, so a negatively correlated control is subtracted with a negative , which is the same as adding it back. Either way the removed variance is .
QuestionA team estimates an average with a plain simulation and wants a control. They propose using a cheap approximate model whose mean they estimate from 10 extra runs. What is the main risk, and what would you check?Show answer
The mean of the control is estimated, not known exactly, so its sampling error no longer averages to zero by construction, and most of the variance reduction can be lost. Check the correlation between the approximate model and the target on the main runs, and either compute the control's mean with far more runs or find a control with an exact formula. A pilot run to estimate separately is also advisable.