Prove $\text{min } \mathbb{E}[Y-g(X)] = \mathbb{E}[(Y-\mathbb{E}[Y|X])^2]$ where the min is with respect to g(X)

87 Views Asked by At

As my title states, I'm trying to prove $$ \text{min } \mathbb{E}[Y-g(X)] = \mathbb{E}[(Y-\mathbb{E}[Y|X])^2] $$ where the min is with respect to g(X) and I think I am very close to the answer. So far I have expanded $\mathbb{E}[Y-g(X)]$ to $$ \mathbb{E}\Big[(Y-g(X))^2\Big]=\mathbb{E}\Big[(Y-\mathbb{E}[Y|X])^2\Big]+2\mathbb{E}\Big[Y\mathbb{E}[Y|X]-Yg(X)-\mathbb{E}[Y|X]^2+\mathbb{E}[Y|X]g(X)\Big]+\mathbb{E}\Big[(\mathbb{E}[Y|X]-g(X))^2\Big] $$ I see here that if I set $g(X)=\mathbb{E}[Y|X]$, all the terms will go to $0$ except for $\mathbb{E}\Big[(Y-\mathbb{E}[Y|X])^2\Big]$, making $$ \mathbb{E}\Big[(Y-g(X))^2\Big]=\mathbb{E}\Big[(Y-\mathbb{E}[Y|X])^2\Big] $$ which appears to be what the question asks for. My question is if this would really prove what I am trying to prove or not? If not, I am unsure of how I would show what these expected values would be to make things more explicit.

1

There are 1 best solutions below

3
On BEST ANSWER

Conditioning on $X$ gives:

$$\mathbb{E}[(Y-g(X))^2] = \mathbb{E}\bigg[\mathbb{E}\bigg[(Y-g(X))^2 \vert X \bigg]\bigg].$$

Note that this is equivalent to factoring the joint density $f_{X,Y}(x,y)$ and splitting up the integral.

Denote $h(x) = \mathbb{E}\bigg[(Y-g(X))^2 \vert X = x\bigg]$ (or the inner integral)

We have: $h(x) \geq \mathbb{E}\bigg[(Y-\mathbb{E}(Y\vert X))^2 \vert X = x\bigg]$

Therefore,

$$\mathbb{E}[(Y-g(X))^2] \geq \mathbb{E}[(Y-\mathbb{E}(Y\vert X))^2],$$

where the equality holds for $g(X) = \mathbb{E}(Y\vert X).$