Learn more from fewer runsLesson 47 of 76 · 9 min

Subtract a fluctuation you can explain

Construct a control-variate estimator using a known expectation.

A control variate is a related random quantity whose expectation is known. Subtracting a coefficient times its deviation from that expectation leaves the target expectation unchanged, while a useful coefficient can reduce variance.

An unbiased estimator averages to the target over repeated independent runs; one run still has random error. Bias is a systematic difference between that repeated-run average and the target. Fit the coefficient on a separate pilot sample, then hold it fixed on the main draws. Since E[U−.5]=0, the fixed adjustment has zero mean and preserves the target.

A poor coefficient can increase variance. A wrong claimed control expectation shifts the target and introduces bias. Always state where the reference expectation comes from and compare precision for the actual controlled estimator. More elaborate same-sample coefficient procedures need their own analysis.

β^\widehat\beta is the pilot-fitted coefficient. The contribution Y is the original function value minus that coefficient times the known-zero-mean fluctuation.

Remove a fluctuation with known mean
  1. Known reference expectation
    E[U]=1/2E[U]=1/2
  2. Fit a coefficient on a pilot
    β^\widehat\beta
  3. Adjust the main draws
    Y=eU−β^(U−1/2)Y=e^U-\widehat\beta(U-1/2)
Reference illustration. The pilot and main sample are separate in the source. The adjustment uses a known expectation and must leave the intended target unchanged; an unjustified reference mean introduces bias.

What happens if you subtract a control whose supposed expectation is wrong?

Write a prediction (optional)

Seeded teaching simulation

Select Run Python below with the code unchanged.

Tools
About Python ↗

The code is editable. Press Ctrl+Enter or ⌘+Enter to run Python from the editor.

Published example output

This result comes from the original Python. Your runs appear above. Build environment ↗

Pilot coefficient: 1.68
plain mean: 1.717243 MCSE: 0.003467
controlled mean: 1.717818 MCSE: 0.000444
Exact target: 1.718282

Read the first result

The known expectation is essential, and the pilot costs evaluations too. Include that cost in a fair efficiency comparison.

Try an edit

Replace controlled = plain - beta*(u-.5) with controlled = plain - beta*(u-.55). Select Run Python again. Compare the controlled mean and its MCSE with Exact target and the plain mean. Can a smaller MCSE keep a wrong reference from shifting the estimate?

Back to the Python editor

Scope. This uses a separate pilot and an exactly known uniform expectation. Real controls may have approximation or estimation error.

Try a fresh case

Which control-variate condition protects the target expectation in this construction?

Choose an answer
Need a hint?
Hint 1

Take the expectation of the adjustment term.

Hint 2

Separate pilot fitting from production averaging.

Your notes