et $Y$ be an integrable random variable on a probability space $(\Omega, \mathcal{F}, \mathbb{P})$ and let $\mathcal{G}$ be a sub- $\sigma$-algebra of $\mathcal{F}$. Based on the information in $\mathcal{G}$, we can form the estimate $\mathbb{E}[Y \mid \mathcal{G}]$ of $Y$ and define the error of the estimation $\mathrm{Err}_{\mathrm{rr}}=Y-\mathbb{E}[Y \mid \mathcal{G}]$. This is a random variable with expectation zero and some variance $\operatorname{Var}(\operatorname{Err})$. Let $X$ be some other $\mathcal{G}$-measurable random variable, which we can regard as another estimate of $Y$. Show that
$$
\operatorname{Var}(\operatorname{Err}) \leq \operatorname{Var}(Y-X) .
$$
In other words, the estimate $\mathbb{E}[Y \mid \mathcal{G}]$ minimizes the variance of the error among all estimates based on the information in $\mathcal{G}$. (Hint: Let $\mu=\mathbb{E}(Y-X)$. Compute the variance of $Y-X$ as
$$
\mathbf{E}\left[(Y-X-\mu)^2\right]=\mathbb{E}\left[((Y-\mathbb{E}[Y \mid \mathcal{G}])+(\mathbb{E}[Y \mid \mathcal{G}]-X-\mu))^2\right] .
$$
Multiply out the right-hand side and use iterated conditioning to show the cross-term is zero.)