Conditional Expectation
The average of one random variable once you know the value of another — a prediction that updates as information arrives. It is a function of what you know, the best possible forecast in a squared-error sense, and the engine behind the tower property.
Prerequisites: Conditional Probability, Expected Value
Conditional expectation is the answer to "given what I now know, what should I expect on average?" Plain Expected Value gives one number for a random quantity before you learn anything. Conditional expectation, written , gives your updated average for once the value of some related variable is revealed. It's the mathematical form of learning: new information reshapes your best guess.
The subtle, important part is that is itself a random variable, not a single number. For each possible value that might take, there's a conditional average , computed from the conditional distribution of given that . Collect those averages into a rule and you get a function of : feed in whatever turned out to be, read off the corresponding expected . Once is observed the answer becomes a number; before that, it's random because is.
The tower property
The most-used fact about conditional expectation is the law of total expectation, also called the tower property. It says that if you average all the conditional averages, weighting each by how likely its condition is, you get back the plain unconditional average:
In words: split the world by the value of , take the average of inside each slice, then average those slice-averages by their probabilities, and you recover the overall mean. It's a formal version of "condition on something to simplify, then un-condition at the end," and it turns many gnarly expectation problems into a two-step calculation.
is a function of , hence a random variable, not a number. Its defining identity is the tower property : average the conditional means, weighted by their probabilities, and you get the unconditional mean back.
Worked example: total expectation in two steps
A stock's daily return depends on which regime the market is in. In a calm "up" regime, which occurs with probability , the average daily return is . In a jittery "down" regime, probability , the average return is . What's the overall expected daily return?
Condition on the regime, then apply the tower property:
The conditional expectations and are the two values of the random variable ; weighting them by the regime probabilities collapses everything to the single unconditional mean . That two-line move, condition, then average the conditions, is the workhorse pattern.
The best-predictor property
There's a second reason conditional expectation is everywhere: among all possible functions of , the conditional mean is the one that predicts with the smallest average squared error. If you must guess from and you'll be scored on squared mistakes, you cannot beat . This is exactly why regression targets the conditional mean, and, when the variables are jointly Gaussian (see the The Multivariate Normal Distribution), that best predictor happens to be a straight line, which is what makes linear regression the correct model there rather than merely a convenient one.
is the minimum-mean-squared-error forecast of from : no other function of predicts with smaller average squared error. Regression is just the search for this conditional mean.
Common pitfalls
- It's a function, not a number. varies with ; only , at a specific , is a number. Mixing the two up is the classic beginner slip.
- Mean-independence is weaker than independence. says doesn't move 's mean, but could still change 's variance or shape. Full independence is a stronger condition than a flat conditional mean.
- Condition on the right thing. Choosing a helpful variable to condition on is an art; a good choice (like the regime above) makes the inner expectations trivial, a bad one leaves you exactly where you started.
Conditional expectation grows straight out of Conditional Probability (average with respect to the conditional distribution), pairs with the The Law of Total Probability as its expectation-flavoured twin, reads slices out of Joint and Marginal Distributions, and underlies martingales, filtering, and nearly every forecasting model in quant finance.
Related concepts
Practice in interviews
Further reading
- Blitzstein & Hwang, Introduction to Probability, ch. 9
- Williams, Probability with Martingales (ch. 9)