Conditional expectation averages over the uncertainty that remains after some information has been supplied. It is especially useful when a complicated model becomes simple after we condition on a count, a category, or a hidden parameter.
Conditioning on an event or a variable
For a continuous conditional distribution, replace the sum by an integral against the conditional density. For example, the expected value of a fair die given that the roll is odd is .
is a number depending on . Replacing by the random variable gives , which is itself a random variable. It is a function of the information in .
The second identity takes out what is already known. In particular, . If is independent of , then . The converse need not hold.
The tower property
First average within each condition, then average those answers using the probabilities of the conditions. This is the law of total expectation, also called the tower property.
Here the form a partition and the conditional expectations are defined for the positive-probability cases.
Total variance
The first term is average variation within groups. The second is variation between the group means. A mixture can therefore have substantial overall spread even when each component is tightly concentrated.
For example, suppose two equally likely groups have means zero and ten, and each has variance four. Their overall mean is five. The within-group contribution is four, and the two group means have variance twenty-five, giving total variance twenty-nine.
Random sums
Let , with when . Assume the are i.i.d., independent of the nonnegative integer count , with mean and variance . Conditioning on gives:
The second variance term accounts for fluctuations in how many summands appear. Dropping it treats a random count as if it were fixed.