Conditional Expectation and the Tower Rule
2 min read
If linearity of expectation is the most-used tool in this course, conditioning is the second. The tower rule (law of total expectation) says you can compute an expectation in stages:
Average the conditional averages, weighted by how likely each condition is. Almost every "two-stage randomness" question is this identity applied once.
The basic move
"Roll a die, then flip that many fair coins. Expected heads?"
Condition on the roll: . Then average over the roll:
No enumeration of 6 × outcomes — the stage structure does the work. The general pattern for a random sum (random independent of the ) is Wald's identity:
Instant applications: expected total order flow (random number of trades × average trade size), total claims (random claim count × average claim), total P&L over a random number of bets. Variance has its own two-stage version (the law of total variance, ) — "within" plus "between" variance, worth knowing by name.
Conditional expectation as best prediction
is a random variable — a function of — and it is the best predictor of given in the least-squares sense. Regression (from the statistics course) is the linear approximation of exactly this object; regression to the mean is a statement about it. The martingale definition from earlier in this course ("") now reads naturally: the best prediction of tomorrow is today.
Two properties used constantly, worth stating precisely:
- Taking out what is known: .
- Independence drops the condition: if , then .
Conditioning as a problem-solving reflex
The craft is choosing what to condition on — the first event, the first success, the identity of a maximum, a symmetry-breaking piece of information:
- First-step conditioning built every waiting-time recurrence in this course (flips until HH, ant on the cube).
- Condition on the source: "Two dealers quote; one is sharp (spread 2), one is wide (spread 10), you can't tell which is which. Expected spread of a random quote?" — . Trivial with conditioning, murky without.
- The two-envelope paradox is a cautionary tale: conditioning done sloppily ("the other envelope has or , each with probability ½") smuggles in an improper prior and "proves" you should always switch. Diagnosing where that argument breaks — the conditional probabilities aren't ½ for any proper prior — is a genuinely strong interview answer.
The interview version
"A miner faces three doors: one exits in 2 hours; one loops back after 3 hours; one loops back after 5. He picks uniformly at random each time, with no memory. Expected time to exit?" — Condition on the first door: , so , giving hours. One equation, because conditioning on the first choice resets the problem. When a question has stages, layers, or a "then" in it — condition first, compute second.