If $\text E[\varepsilon|X] = 0$, why is $\text{cov}(\varepsilon , X) = 0$? If $\text E[\varepsilon|X] = 0$, why is $\text{cov}(\varepsilon , X) = 0$? Can someone please explain it algebraically and intuitively?
This is related to OLS and is based on the first assumption of CLRM.
 A: It is a consequence of the following two properties of conditional expectation:

*

*"Pulling out known factors": $E[\xi\eta|\xi] = \xi E[\eta|\xi]$ for random variables $\xi, \eta$.

*"Law of total expectation": $E[\xi] = E[E[\xi|\eta]]$.

By property 2, $E[\epsilon] = E[E[\epsilon|X]] = 0$.  It then follows by property 1 and property 2 that
\begin{align}
 & \operatorname{Cov}(\epsilon, X) \\
=& E[\epsilon X] - E[\epsilon]E[X] \\
=& E[\epsilon X] \\
=& E[E[\epsilon X|X]] \\
=& E[XE[\epsilon|X]] \\
=& E[X\cdot 0] = 0. 
\end{align}
Intuitively, $E[\epsilon|X] = 0$ implies that the "conditional covariance" (I don't think it's a widely accepted term, though) $E[\epsilon X|X] = XE[\epsilon|X] =  0$ (as given $X$, the randomness of $X$ has been removed), that $E[\epsilon X] = 0$ is then just a result of integrating over the region of $X$ (with respect to the distribution function of $X$).
A: Observe $$\operatorname{Cov}[\mathbf x, \varepsilon]=\operatorname{Cov}[\mathbf x, \operatorname E[ \varepsilon|\mathbf x]]=\operatorname{Cov}[\mathbf x, 0]=\mathbf 0.$$
