1.6 Computing Variances by Conditioning

The conditional variance \(\var (X\mid Y)\) is the random variable that takes the value \(\var (X\mid Y = y) = E(X^2\mid Y = y) - \left [E(X\mid Y = y)\right ]^2\) when \(Y = y\).

Theorem 1.6.1 (Law of total variance). \(\var (X) = E\left [\var (X\mid Y)\right ] + \var \left [E(X\mid Y)\right ]\).

Proof. Taking expectations of \(\var (X\mid Y) = E(X^2\mid Y) - \left [E(X\mid Y)\right ]^2\) and using lemma 1.3.1, \[E\left [\var (X\mid Y)\right ] = E(X^2) - E\left [\left (E(X\mid Y)\right )^2\right ].\] Also, since \(E\left [E(X\mid Y)\right ] = E(X)\), \[\var \left [E(X\mid Y)\right ] = E\left [\left (E(X\mid Y)\right )^2\right ] - \left [E(X)\right ]^2 .\] Adding the two lines, the middle terms cancel and leave \(E(X^2) - [E(X)]^2 = \var (X)\). □

Example 1.6.2. Find the variance of the random sum \(S = X_1 + \cdots + X_N\) of example 1.3.3.

Solution. Given \(N\), \(S\) is a sum of \(N\) independent terms, so \(E(S\mid N) = N\mu \) and \(\var (S\mid N) = N\sigma ^2\). By theorem 1.6.1, \[\var (S) = E(N\sigma ^2) + \var (N\mu ) = \mu _N\sigma ^2 + \mu ^2\sigma _N^2 .\] The first term is the variation in spending per customer, the second the variation in the number of customers. If \(N\) is Poisson with mean \(\lambda \), so that \(\mu _N = \sigma _N^2 = \lambda \), this becomes \(\lambda (\sigma ^2 + \mu ^2) = \lambda E(X_1^2)\), the variance of a compound Poisson variable.

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.