X, Y are random variables on probability space , f is a measurable function, Show that F(X) and Y-E[Y|X] uncorrelated.
I have tried the followings :
Cov(f(X),Y-E[Y|X]) = E[f(X)(Y-E[Y|X])] -E[f(X)]E[Y-E[Y|X]]
= E[f(X)Y]-E[f(X)E[Y|X]]-E[f(X)].E[Y]+E[f(X)].E[E[Y|X]]
, due to E[Y]=E[E[Y|X]], then the above reduce to
= E[f(X)Y]-E[f(X)E[Y|X]]
at this step I stuck, so I really appreciate if anyone can give the trick to complete this problem.
Hint: Push $f(X)$ inside the conditional expectation as it is $\sigma(X)$-measurable and re-use the law of iterated expectations.