# Some equation involving $cov(X,Y)$ and $E(X|Y)$

I am trying to find some math equation envolving $$cov(X,Y)$$ and the conditional expectation $$E(X|Y)$$.

I'm willing to put some hypotheses. For example, if $$E(X)=0$$ or $$E(Y)=0$$, then $$cov(X,Y) = E(XY)$$. Thus, I am looking for some relation between $$E(XY)$$ and $$E(X|Y)$$. The closest I found was the Law of total covariance:

$$\operatorname{cov}(X,Y)=\operatorname{E}(\operatorname{cov}(X,Y \mid Z))+\operatorname{cov}(\operatorname{E}(X\mid Z),\operatorname{E}(Y\mid Z))$$

But this isn't exactly what I'm looking for.

Does anyone know any classic formula?

• Do you know that $cov(X,Y) = E(XY) - EX \cdot EY$? Commented Dec 29, 2021 at 20:09
• Yes, but how about the conditional expectation?
– Fam
Commented Dec 29, 2021 at 20:10
• Have you used $E(E(X|Y)) = E(X)$? Commented Dec 29, 2021 at 20:54
• Yes, but how about $cov(X,Y)?$
– Fam
Commented Dec 29, 2021 at 20:55

Using conditioning on $$Y$$, we can get: $$E[XY] = E[E[XY|Y]] = E[YE[X|Y]]$$
$${\rm cov}(E[X\mid Y],Y) = {\rm cov}(X,Y)$$