Expected value of square conditional expected value

244 Views Asked by At

I need to prove that $\mathbb{V}(Y)=\mathbb{E}(\mathbb{V}(Y\mid X))+\mathbb{V}(\mathbb{E}(Y\mid X))$. Using the fact that $\mathbb{V}(Y\mid X)=\mathbb{E}\left (\left (Y-\mathbb{E}(Y\mid X)\right )^2\mid X\right )$, I got that $$\mathbb{E}(\mathbb{V}(Y\mid X))+\mathbb{V}(\mathbb{E}(Y\mid X))=\mathbb{E}\left (Y^2\right )-2\mathbb{E}(Y\mid X)+(\mathbb{E}(Y\mid X))^2+\mathbb{E}\left (\mathbb{E}(Y\mid X)^2\right )-\mathbb{E}(Y\mid X)^2.$$So in order to complete the proof, I need that$$\mathbb{E}\left (\mathbb{E}(Y\mid X)^2\right )=2\mathbb{E}(Y\mid X)-\mathbb{E}(Y\mid X)^2.$$But I don't know if this is true or how to proceed.

1

There are 1 best solutions below

0
On BEST ANSWER

You've made some errors in your calculation. Be very careful when applying the tower rule.

$$\begin{align} \text{Var}(Y \mid X) &= E[(Y - E[Y \mid X])^2 \mid X] \\ &= E\Big[Y^2 - 2 Y E[Y \mid X] + (E[Y \mid X])^2 \mid X\Big] \\ &= E[Y^2 \mid X] - 2(E[Y \mid X])^2 + (E[Y \mid X])^2 \\ &= E[Y^2 \mid X] - (E[Y \mid X])^2 \end{align}$$ (note that this is the conditional analogue of $\text{Var}(Y) = E[Y^2] - E[Y]^2$). Thus, $$E[\text{Var}(Y \mid X)] = E[Y^2] - E[(E[Y \mid X])^2].$$

The other term is $$\text{Var}(E[Y \mid X]) = E[(E[Y \mid X])^2] - (E[Y])^2.$$