I'm trying to show some results in binary response models, and a couple of the proofs use the "fact" that $E(u^2)=Var(y)$, but I can't see why this is.
The setup is that $y$ takes on the value $0$ or $1$, and we could write \begin{equation} P(y=1|\mathbf{x})=g(\mathbf{x\beta}) \end{equation} where $g:\mathbb{R} \to (0,1)$ ($g$ could represent the Normal CDF in the case of a Probit for example). Or, you could take the Poisson case where \begin{equation} P(y=1|\mathbf{x})=\exp\left[-E\left(y\middle\vert\mathbf{x}\right)\right]\frac{E\left(y\middle\vert\mathbf{x}\right)^y}{y!} \end{equation}
In showing some results use, specifically, $E(u^2|\mathbf{x})=Var(y|\mathbf{x})$ (where note that we define $u=y-g(\mathbf{x\beta}$). I'm trying to figure out why this would be true, but can't see why. Anyone know why this is?
Thanks!