Law of Iterated Expectations (LIE)
"The Expectation of the Conditional Expectation is the Expectation"
1. Mathematical Expression
$$E[X] = E[E[X|Y]]$$
Left $E[X]$: The unconditional expectation of random variable $X$ (big picture view).
Inner $E[X|Y]$: This is a random variable with respect to $Y$. When $Y$ takes different values, we observe the conditional average of $X$ (hierarchical view).
Outer $E[\cdot]$: Take the weighted average of these hierarchical means.
Discrete Form Expansion:
This is the core formula demonstrated in the visualization below.
2. Intuitive Understanding: Hierarchical Thinking
Imagine you want to calculate the average height of all students in a school ($E[X]$):
- First, group students by grade (condition $Y$).
- Calculate the average height for each grade (conditional expectation $E[X|Y=y]$).
- Take the weighted average of these grade averages, weighted by grade size.
- The result equals the overall school average height.
Applications:
3. Calculation Steps Breakdown
Step 1: Calculate Conditional Expectations
Step 2: Get Weights
Step 3: Weighted Sum
Step 4: Get Unconditional Expectation
Multi-layer Population Expectation Decomposition
气泡大小代表权重 $P(Y)$, 内部高度代表 $E[X|Y]$
最终全期望 $E[X]$
0.00
Law of Iterated Expectations holds
0.0
0.0
0.0
Verify Formula:
E[X] = Σ E[X|Y=y]·P(Y=y)
Key Insights
Significance of the Law
The Law of Iterated Expectations shows that we can calculate overall expectation by first computing conditional expectations at each level, then integrating them through weighted averaging. This provides a methodology for decomposing complex problems.
Visual Interpretation
In the visualization, each bubble's size represents the subgroup weight P(Y), and the column height represents the conditional expectation E[X|Y]. The baseline for E[X] shows where the weighted average falls.