Lecture 6. D) Law of Iterated Expectations
Law of Iterated Expectations
If [math]\left(X,Y\right)'[/math] is a random vector, then
[math]E\left(X\right)=E\left[E\left(\left.X\right|Y\right)\right],[/math]
provided the expectations of [math]X[/math] and [math]Y[/math] exist. Notice, above, that the outer expectation is w.r.t. [math]Y.[/math]
The intuition is that, in order to calculate the expectation of [math]X[/math], we can first calculate the expectations of [math]X[/math] at each value of [math]Y[/math], and then average each one of those.
Proof of the Law of Iterated Expectations
Here we prove the law of iterated expectations for the continuous case:
[math]\begin{aligned} E\left(X\right) & =\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}s.f_{X,Y}\left(s,t\right)dtds\\ & =\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}s.\underset{=f_{X,Y}\left(s,t\right)}{\underbrace{f_{X|Y}\left(s,t\right)f_{Y}\left(t\right)}}dtds\\ & =\int_{-\infty}^{\infty}\underset{E_{\left.X\right|Y}\left(\left.X\right|Y\right)}{\underbrace{\int_{-\infty}^{\infty}s.f_{X|Y}\left(s,t\right)ds}}f_{Y}\left(t\right)dt\\ & =E_{Y}\left[E_{\left.X\right|Y}\left(\left.X\right|Y\right)\right].\end{aligned}[/math]