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.
is the pilot-fitted coefficient. The contribution Y is the original function value minus that coefficient times the known-zero-mean fluctuation.
- Known reference expectation
- Fit a coefficient on a pilot
- Adjust the main draws
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.
A saved draft is open. To run the published example, open Tools and select Restore example. Recover draft brings your code back.
Execution error
Technical error details
Your result
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?
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?
Need a hint?
Hint 1
Take the expectation of the adjustment term.
Hint 2
Separate pilot fitting from production averaging.