If is a random variable that depends on another random variable , then

This is called the *double expectation* formula. It is important to keep track of which random variable in a problem is and which one is . Wieshaus calls the indicator variable. In the above equation, and are functions of

**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?

- Identify the random variables.
- The stolen amount is what we’re interested in so this is .
- The distribution of depends on which jar the coin came from so the choice of jar is the indicator variable .

- Find the distribution of
- with 99% probability.
- with 1% probability.

- Find the distribution of
- with 99% probability.
- with 1% probability.