Use a quantity whose mean is known
An unbiased Monte Carlo estimator can still fluctuate widely. If each simulation also produces a correlated quantity whose expectation is known, subtracting its centered fluctuation may reduce variance without changing the target. The gain is a mathematical comparison at equal numbers of paired replications; extra computation and memory must be measured separately.
Definition 8.1.1
(Control-variate estimator)
Let have finite second moments, with unknown target , known control mean , and . The variables may be dependent within a pair. For a fixed real number , define
Generate independent identically distributed copies , with fixed in advance, and average .
Independence is between pairs, not between and : the method works precisely because and move together within a replication.
Theorem 8.1.2
(The best fixed coefficient)
Every fixed gives . Its variance is minimized at
Proof
(Expand the variance and complete the square)
Centering gives , and averaging preserves the mean. Expand the square of the centered variable:
Completing the square gives
which is smallest exactly at . Because the paired replications are independent, the variance of their average is this quantity divided by . The minimum is nonnegative because it is a variance.
Proof X-ray
Unbiasedness and variance use different assumptions
The proof makes two independent claims, and each rests on its own hypothesis. Unbiasedness uses only linearity, the exact control mean , and the fact that is a constant: if were random and correlated with , the expectation of would no longer split as . The variance formula uses finite second moments and , which is what makes the quadratic in strictly convex with a unique minimizer. Independence between replications enters only at the last step, to divide by ; dependence within each pair is the source of the gain, since the term removed is .
The optimal variance can also be read without completing the square.
Concept lensGeometric
The best coefficient is an orthogonal projection
In the space of finite-variance random variables with inner product , the quantity is the squared length of . Minimizing over projects onto the line spanned by , and is the projection coefficient, the same as the slope of the least-squares regression of on . The residual is orthogonal to , and Pythagoras gives the minimum as , where is the correlation of and . Only matters: a strongly negative correlation is as useful as a strongly positive one.
A worked integral
Worked example 8.1.3
(Using to estimate the mean of )
Let be uniform on , and . Then , , , , and . Thus and
With independent draws, the adjusted average has variance , versus for the ordinary average: a sixteenfold reduction in variance, matching . This comparison uses the same number of draws of ; a runtime comparison must also count evaluating and storing the control.
Worked example 8.1.4
(A negatively correlated control)
Keep but use , again with mean and variance . Now , so and
Indeed is the same random variable as in the previous example. The sign of the coefficient follows the sign of the covariance; the variance reduction depends only on its magnitude.
Worked example 8.1.5
(How far the coefficient may drift)
In the uniform example, the completed square reads . For , , still ten times smaller than . For , : exactly the variance with no control at all. For , , so the control now hurts. In general a fixed helps if and only if it lies strictly between and ; the boundary value is the edge case of no change.
Choosing a coefficient from data
The optimal coefficient often depends on unknown moments. One option is to estimate a coefficient from an independent pilot, then generate fresh independent estimation pairs. Conditional on any finite realized pilot value, the estimation average remains unbiased because . Define for fixed . If has finite second moment, the unconditional estimator is unbiased and its variance is . A noisy pilot can still choose a coefficient that increases variance relative to no control, as the value above shows.
Counterexample mode
Reusing a sample can introduce bias
In the same uniform example, take one draw and choose the coefficient from that very draw. The adjusted observation becomes
Its expectation is , not the desired . This does not say every same-sample fitting method is biased; it shows that fixed-coefficient unbiasedness cannot simply be reused when the coefficient depends on the estimation data.
With , the displayed optimum divides by zero; in that case almost surely and centering supplies no variance reduction.
Common mistake
(Treating an approximate control mean as known)
If the supplied control mean is rather than the true , the adjusted expectation becomes . In the uniform example with and a supplied mean , every average estimates , however large is. Even a strong correlation cannot correct a wrong supposedly known mean; the variance shrinks around the wrong value.
Exercises
Quick check
(In the uniform example, verify and compute .)
Solution · Answer
. With , .
Quick check
(For independent uniform draws, give the ordinary and optimally adjusted variances.)
Solution · Answer
The ordinary average has variance , and the adjusted average .
Quick check
(If but , what is the best fixed coefficient?)
Solution · Answer
. The variance is , so a nonzero fixed coefficient can only add the term .
Quick check
(Why does a coefficient estimated from an independent pilot preserve unbiasedness of a fresh estimation average, while same-sample fitting requires separate analysis?)
Solution · Answer
Conditioning on the independent pilot makes its finite coefficient fixed relative to the fresh pairs, and the fresh centered control still has mean zero. If the same sample sets the coefficient, this conditional independence need not hold, as the counterexample shows.
Further reading
MIT OpenCourseWare, Simulation Methods discusses control variates and a two-stage simulation approach.