Iterated Law of Expectation in Linear Regression

141 Views Asked by At

Suppose $E(Y|X)$ exists. There exists a disturbance term $\epsilon$ such that $Y=E(Y|X)+\epsilon$ where $E(\epsilon|X)=0$.

I have trouble understanding the following simplifying process:

$E(Y-E(Y|X)|X)=E(Y|X)-E(E(Y|X)|X)$.

The second term on RHS simplifies to:

$E(Y|X)$.

Can someone explain this in detail? Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

Note that $E[Y|X]$ is a shorthand for $E[Y|X=x]=g(x)$, so $E(E(Y|X)|X=x)=E(g(X)|X=x))=g(x)$.