# conditional expectation function and residuals

Im struggling to understand the relationsship of the conditional expectation function and the residuals. Im readings mostly harmless econometrics, and in theorem 3.1.1 (i) they prove that E (e I X) is 0, see here: http://econ.lse.ac.uk/staff/spischke/mhe/ex_ch3.pdf

However, later in the book they claim this is only true when the CEF is linear, but not in the more general case. The proof they give, however, seems to pertain to all CEF. Can somebody help me?

• Could you also link to the chapter later in the book in which they make the claim? Nov 4, 2017 at 18:59
• im struggling to find it on the internet, ill just copy the original text later if you care to take a look again then :)
– leo
Nov 4, 2017 at 19:09
• So, they first state that E(ß^) = ß + E((XX')Xe). Then they go on to write the following: "If the regressors are nonrandom (fixed in repeated samples) the expectation passes through and we have unbiasedness because E(e) = 0. Otherwise, with random regressors, we can iterate expectation and get unbiasedness if E(e I X) = 0. This is true when the CEF is linear, but not in our more general "agnostic regression" framework. I hope this makes it clearer, thanks for having a look at it :)
– leo
Nov 4, 2017 at 21:36

It would be good to acquire the habit of reserving the word "residuals" for the estimated magnitude of the "error" from, say, a regression.

Now, when in the relation

$$y = m(x) + e$$

we define $m(x)\equiv E(y \mid x)$, then $e$ is the Conditional Expectation Funtion error, which has nothing to do with the usuall "error term" we are talking about in a standard "classical" regression setting. The CEF error is actually and exactly "what is left" after we subtract from $y$ its conditional expectation with respect to $x$.

Then, by construction

$$y = E(y\mid x) + e \implies E(y\mid x) = E[E(y\mid x) \mid x] + E(e\mid x)$$

But by basic properties of the Conditional expectation, $E[E(y\mid x) \mid x] = E(y\mid x)$$and so we obtain$$E(y\mid x) = E(y\mid x) + E(e\mid x) \implies E(e\mid x) = 0$$Always. No matter what functional form does$m(x)\$, linear or non-linear.

Reading the OP's comment, what I suspect the authors of the book say "later on" essentially confounds the classical linear regression set up with the Conditional Expectation Function set up, as well as the error term in the classical linear regression model, with the CEF error.