Law of total expectation
ID: law-of-total-expectation
The law of total expectation makes averaging in stages reliable, provided the outer stage uses the actual probabilities of the groups. For an integrable random variable and a sub-sigma-algebra ,Replacing each outcome by its group's conditional mean preserves the overall expected value. In the definition of conditional expectation, take the event to obtain this identity.[ref]
For a complete finite example, choose a group with probability and with probability . Within group , is or with equal conditional probabilities; within group , it is or with equal conditional probabilities. Thus the joint probability distribution puts probabilities on . The conditional means are two and eight. Consequently,Direct averaging of the four values gives the same . Taking the unweighted average of the two group means instead gives five, which describes a different choice of group probabilities. This is why the outer weighting matters.
The formula is useful when conditioning on a first choice makes the remaining experiment simple. It can replace a large outcome enumeration by smaller calculations within groups. In a mixture distribution, it combines component means using mixture weights; in a random sum of independent claims, it separates the number of summands from their individual expected values under the stated independence assumptions. The same averaging step appears in the law of total variance.
New to topics? Read the docs here!
