let $(\Omega,\mathcal{F},\mathbb{P})$ be a probability space and $\ X : \ \Omega \ \rightarrow \mathbb{R} \ $ a real random variable with respect to $\mathcal{F}$ with
$$\mathbb{E}(X^2)<{\infty}$$ Let $\mathcal{G}\subset\mathcal{F}$ be a $\sigma$-algebra on $\Omega$. We introduce $$Y= \mathbb{E}[X|\mathcal{G}], \ \ \ \ \ \ \ Z=\mathbb{E}[(X-Y)^2|\mathcal{G}]$$ We recall that $Y\in L^2(\Omega,\mathcal{G},\mathbb{P})$ so that both $Y$ and $Z$ are well defined.
- Prove that $\mathbb{E}(Z)= \mathbb{E}(X^2)-\mathbb{E}(Y^2)$
- Deduce from this that the variance of $X$ satisfies
$$Var(X) = Var(Y)+\mathbb{E}(Z)$$
Thank you for your help. I appreciate it.
Let's observe first that $E(Y) = E(X)$ by the tower property, and hence $$ V(X) - V(Y) = E(X^2) - E(X)^2 - E(Y^2) + E(Y)^2 = E(X^2) - E(Y^2). $$ Thus we have shown that (1.) and (2.) are equivalent, so it suffices to prove just one of them. We'll prove (1.)
Let us simply take the expectation of $Z$ and see that happens. As you rightly observe, $X$ is not $\mathcal{G}$-measurable but (by definition of conditional expectation) $Y$ is. Hence we have $$ \begin{align*} E(Z) &= E( E( X^2 + Y^2 - 2 X Y \mid \mathcal{G}) ) \\ &= E(E(X^2 \mid \mathcal{G})) + E(E(Y^2 \mid \mathcal{G})) - 2 E(Y E(X \mid \mathcal{G})) \\ &= E(X^2) + E(Y^2) - 2 E(Y^2) \\ &= E(X^2) - E(Y^2), \end{align*} $$ since $Y = E(X \mid \mathcal{G})$, by definition.
I agree that (2.) is a pretty scary looking equation (personally I don't like working with variances as much as expectations), but given the explicit form of $Z$ one really just needs to have the courage to bash out some algebra and hope for the best -- in this case our hope was fulfilled!