Understanding a Substep of the Proof for the Law of Total Variance

486 Views Asked by At

In the proof for the Law of Total Variance, the following lemma seems to be appealed to (when going from the 2nd to the 3rd step of the proof):

$$ E[E[Y^2 \mid X]] = E[\text{Var}[Y \mid X] + [E[Y \mid X]]^2] $$

Where does this come from and/or what justifies it?

2

There are 2 best solutions below

0
On BEST ANSWER

This is the expectation of

$$ E[Y^2\mid X]=\operatorname{Var}[Y\mid X]+E[Y\mid X]^2\;, $$

which is the conditional version of the definition of the variance,

$$ E[Y^2]=\operatorname{Var}[Y]+E[Y]^2\;. $$

0
On

Discrete version: $$ \text{Var}[Y|X]=\sum_{y}(y-E[Y|X])^2p_{Y|X}(y|x)\\=\sum_yy^2p_{Y|X}(y|x)-2E[Y|X]\sum_y yp_{Y|X}(y|x)+E[Y|X]^2\sum_{y}p_{Y|X}(y|x)\\ =E[Y^2|X]-2E[Y|X]^2+E[Y|X]^2=E[Y^2|X]-E[Y|X]^2\\ \therefore E[Y^2|X]=\text{Var}[Y|X]+E[Y|X]^2 $$