$$Cov(X-E(X\mid Y), Y) =0 $$
Above $Cov$ denotes Covariance.
My textbook says above identity always holds, but I can't figure why it is so.
Any hint or advice?
Also, if $Cov(X-E(X\mid Y), Y) =0 $ always holds, Does $Var(X-E(X\mid Y), Y) =0 $ always hold?
By definition, \begin{align} \operatorname{Cov}(X-\mathsf E(X|Y),Y)&=\mathsf E(X-\mathsf E(X|Y)-\mathsf EX+\mathsf E\mathsf E(X|Y))(Y-\mathsf EY)\\ &=\mathsf E(X-\mathsf E(X|Y))(Y-\mathsf EY)\\ &=\mathsf E(XY)-\mathsf E(Y\mathsf E(X|Y)) -\mathsf EX\cdot\mathsf EY +\mathsf EY\cdot\mathsf E\mathsf E(X|Y)\\ &=\mathsf E(XY)-\mathsf E(XY) -\mathsf EX\cdot\mathsf EY +\mathsf EY\cdot\mathsf EX\\ &=0 \end{align} Here several properties of conditional expectations are used. For example, $\mathsf E\mathsf E(X|Y)=X$ and $Y\mathsf E(X|Y)=\mathsf E(XY|Y)$.