Law of Total Expectation
E[X] = E[E[X|Y]]: decompose an expectation by conditioning on a variable that splits the problem into tractable cases.
1. The idea
The law of total expectation states : compute 's conditional mean within each value (or scenario) of , then average those means weighted by 's distribution.
This is often the fastest way to compute an unconditional mean when 's behavior differs across natural regimes — market states, customer segments, or successive stages of a process.
It generalizes the ordinary weighted-average intuition: for discrete , or an integral for continuous .
2. Why it matters
This is the standard decomposition behind mixture models, regime-based pricing, and any 'expected value given a scenario' interview question.
3. Core mathematics
Law of total expectation
4. How to recognize it
Think of this when…
- The population or process naturally splits into distinct groups or regimes
- Each group has an easy-to-state conditional mean
- You are given conditional means and group probabilities and asked for the overall mean
5. Worked example
Worked example
A stock is in a bull regime 60% of the time (expected daily return +0.5%) and a bear regime 40% of the time (expected daily return -0.8%). Find the unconditional expected daily return.
- 1
Let be daily return and be the regime.
- 2
Substitute the given values.
- 3
Compute.
- Answer: per day
6. Common mistakes
- Averaging the conditional means without weighting by the probability of each condition
- Confusing (a random variable) with (a fixed number for a specific )
- Applying the law when the conditioning variable doesn't actually simplify the calculation
7. Quick check
60% of customers are 'high value' with expected spend $200, 40% are 'low value' with expected spend $50. What is the overall expected spend?
8. Practice
1 QuantSolve questions use this concept.
Practice this concept9. Related methods
Create a free account to save lesson progress.
Recommended next lessonLaw of Total Variance →