# Covariance with conditional expectation

Suppose $$X$$ and $$Y$$ are random variables, $$E(Y^2) < \infty$$ and $$\varepsilon = Y - E(Y|X)$$ so that $$Y = E(Y|X) + \varepsilon$$.

Given that $$E(\varepsilon | X) = E(\varepsilon) = 0$$, show that $$Cov(\varepsilon , E(Y|X)) = 0$$.

This question has multiple parts so $$E(Y^2) < \infty$$ may or may not be applicable in this case.

Here's what I tried so far. I used the fact that $$Cov(X,Y) = E(XY) - E(X)E(Y)$$ and $$Cov(X,Y) = E[(X - E(X))(Y-E(Y))]$$ and concluded that $$Cov(\varepsilon , E(Y|X)) = E(\varepsilon E(Y|X))$$ or in other words, $$E(\varepsilon E(Y)) = 0$$.

From there, I guess the only thing I have to show is that: $$E(\varepsilon E(Y|X)) = 0$$, but I'm having trouble doing this.
Am I going in the right track or is this completely the wrong approach to tackling this problem?

• Substitute for $\varepsilon$ in $E(\varepsilon E(Y|X))$, and use the law of total expectation by conditioning on $X$ Nov 3, 2013 at 0:18
• Substituting, I get $E((Y-E(Y|X))E(Y|X)) = E(YE(Y|X) - E(Y|X)^2)$. I don't see how I can use the law of total expectation to get anywhere useful. Nov 3, 2013 at 1:31

$$E\Big((Y-E(Y\mid X))E(Y\mid X)\Big) = E\Big(YE(Y\mid X) - E(Y\mid X)^2\Big)$$

$$E\Big(YE(Y\mid X)\Big) - E\Big(E(Y\mid X)^2\Big)$$

Now by the law of total (or is it iterated - I always forget) expectation, we have for the first term

$$E\Big(YE(Y\mid X)\Big) = E\Big[E\Big(YE(Y\mid X)\mid X \Big)\Big] = E\Big[E(Y\mid X)E(Y\mid X ) \Big] = E\Big(E(Y\mid X)^2\Big)$$

so the whole expression equals zero.

• How can you take the expected value of a product of random variables to be the product of expected values? What I'm trying to say is how do we know that $Y$ and $E(Y∣X)$ are independent of each other? Nov 3, 2013 at 3:55
• $Y$ and $E(Y\mid X)$ are not unconditionally independent -but it doesn't matter. $E(Y\mid X)$ is a function of $X$. When we take its expectation conditioning again on $X$, it goes out of the expectations operator, as a matter of basic properties of expected values, irrespective of what other variables may be present. In general, $E(Yh(Z)\mid Z) = h(Z)E(Y|Z)$, irrespective of the unconditional relation between $Y$ and $Z$. Nov 3, 2013 at 4:07
• Using that property, it makes solving this question a lot more easier. Thanks! However, why did you tell me to substitute for $\varepsilon$? Wouldn't it be equally correct to do $E(\varepsilon E(Y|X)) = E(E(\varepsilon E(Y|X) | X)) = E(E(\varepsilon | X)E(Y|X))$? Nov 3, 2013 at 13:56
• I took the twisted route, you found the simpler. Bravo! Nov 3, 2013 at 14:30