Daily Archives: June 22, 2008

Conditional Variance

If $X$ is a random variable that depends on another random variable $I$, then

$Var(X) = E_I[Var_X(X|I)] + Var_I(E_X[X|I])$

This is called the double expectation formula.  It is important to keep track of which random variable in a problem is $X$ and which one is $I$.  Wieshaus calls $I$ the indicator variable.  In the above equation, $Var_X(X|I)$ and $E_X[X|I]$ are functions of $I$

Example 1:  Noemi and Harry work at Starbucks.  Noemi’s tip jar contains 30% dollars, 30% quarters, 20% dimes, 10% nickels and 10% pennies.  Harry’s tip jar contains 5% dollars, 10% quarters, 10% dimes, 35% nickels and 40% pennies.  A customer steals a coin from Harry’s jar with 99% probability and from Noemi’s jar with 1% probability.  What is the variance of the stolen amount?

1. Identify the random variables.
• The stolen amount is what we’re interested in so this is $X$.
• The distribution of $X$ depends on which jar the coin came from so the choice of jar is the indicator variable $I$.
2. Find the distribution of $E_X$
• $E_X[X|I=H] = 0.1065$ with 99% probability.
• $E_X[X|I=N] = 0.4010$ with 1% probability.
3. $Var_I(E_X[X|I]) = 0.000858629$
4. Find the distribution of $Var_X(X|I)$
• $Var_X(X|I=H) = 0.04682275$ with 99% probability.
• $Var_X(X|I=N) = 0.16020900$ with 1% probability.
5. $E_I[Var_X(X|I)] = 0.04795661$
6. $Var(X) = 0.000858629 + 0.04795661 = 0.0488152$