Mean squared error derivation question

264 Views Asked by At

$\text{MSE} = \operatorname E_y \operatorname E_x[y - x'\gamma]^2$ which can be written:

$$\text{MSE} = \operatorname E_{y,x}\{[y - \operatorname E[y\mid x])\}^2 + \operatorname E_{y, x}\{\operatorname E[y\mid x]- x'\gamma\}^2$$

where $x$ is a vector of independent variables in the population regression.

Why can the first expression be written as the second? I assume they have added and subtracted a constant $\operatorname E(y\mid x)$.

If so, where did the cross terms go?