Control variate (source code)

= Control variate
{wiki=Control_variates}

A control variate is a <random variable> with known <expected value> whose centered value is subtracted from a <Monte Carlo estimator> to reduce its <variance>. For a mean-zero vector $G$, put $S=\operatorname{Cov}(G)$ and $c=\operatorname{Cov}(G,H)$. When $S$ is invertible, the optimal estimator averages $H-c^TS^{-1}G$ and has variance $(\operatorname{Var}(H)-c^TS^{-1}c)/N$ for $N$ independent draws. Improvement is strict exactly when $c\ne0$.