Skip to content

Conditioning Trick for Variance

Method

When YY has a natural conditional structure, for example Y∣X=x∼Pois⁡(x)Y\mid X=x\sim\operatorname{Pois}(x), compute Var⁡(Y)\operatorname{Var}(Y) by decomposing it with Eve's law (total variance). This is a calculation method rather than a separate theorem; it needs E[Y2]<∞\mathbb{E}[Y^2]<\infty.


Interpretation

When the distribution of YY is awkward but YY becomes simple once another variable XX is known, compute its mean and variance in two layers: first for fixed XX, then over XX, combined by total variance. This avoids finding the marginal distribution of YY.

Two Poisson probability bar charts, with mean 1 and with mean 3, for the two equally likely values of X; the variance of Y combines the average spread within each case and the spread between the case means.

The figure shows the two cases of the first Example: XX equals 11 or 33 with probability 12\tfrac{1}{2} each, and Y∣X∼Pois⁡(X)Y\mid X\sim\operatorname{Pois}(X). The average conditional variance, the spread within each bar chart, is (1+3)/2=2(1+3)/2=2. The variance of the conditional means 11 and 33, the spread between the charts, is 11. The total variance is therefore Var⁡(Y)=2+1=3\operatorname{Var}(Y)=2+1=3.

The method has three steps. Name the variable XX that makes YY simple; write down m(X)=E[Y∣X]m(X)=\mathbb{E}[Y\mid X] and v(X)=Var⁡(Y∣X)v(X)=\operatorname{Var}(Y\mid X), here the Poisson mean and variance; then compute E[v(X)]\mathbb{E}[v(X)] and Var⁡(m(X))\operatorname{Var}(m(X)) from the distribution of XX alone. The last step needs only the mean and variance of XX, which is why the Key Result Var⁡(Y)=EX+Var⁡(X)\operatorname{Var}(Y)=\mathbb{E}X+\operatorname{Var}(X) holds for every XX with finite second moment. The mean is the same calculation with Adam's law.

The second term is easy to forget. Here Var⁡(Y)=3\operatorname{Var}(Y)=3 exceeds EY=2\mathbb{E}Y=2, although every conditional Poisson law has variance equal to its mean: the randomness of the rate adds variance. This idea returns later in insurance, where a Poisson claim count with a random rate explains claim counts whose variance exceeds their mean (overdispersion).


Key Results

  • Compute m(X)=E[Y∣X]m(X)=\mathbb{E}[Y\mid X] and v(X)=Var⁡(Y∣X)v(X)=\operatorname{Var}(Y\mid X) first; then Var⁡(Y)=E[v(X)]+Var⁡(m(X))\operatorname{Var}(Y)=\mathbb{E}[v(X)]+\operatorname{Var}(m(X)).
  • For Y∣X∼Pois⁡(X)Y\mid X\sim\operatorname{Pois}(X) with finite second moment of XX, EY=EX\mathbb{E}Y=\mathbb{E}X and Var⁡(Y)=EX+Var⁡(X)\operatorname{Var}(Y)=\mathbb{E}X+\operatorname{Var}(X).

Examples

  • If XX is equally likely to be 11 or 33 and Y∣X∼Pois⁡(X)Y\mid X\sim\operatorname{Pois}(X), then EY=2\mathbb{E}Y=2 and Var⁡(Y)=2+1=3\operatorname{Var}(Y)=2+1=3.
  • If X∼Bern⁡(1/2)X\sim\operatorname{Bern}(1/2) and Y∣X∼Bin⁡(4,0.2+0.6X)Y\mid X\sim\operatorname{Bin}(4,0.2+0.6X), the within variance is 0.640.64, the conditional-mean variance is 1.441.44, and total variance is 2.082.08.

Prerequisites

Sources

Symbols: infinity

Last updated: 20 October 2026 03:02