If $X$ is independent of $Y$, is it true that $E(f(X)|Y) = E(f(X))$ for any function $f$? I cannot think of a specific example but am not able to prove it either. The best I have been able to do so far is to recognize that it suffices to show that $f(X)$ is independent of $Y$. From a measure theoretic standpoint, since $X$ and $Y$ are independent, $P(X \in A, Y \in B)= P(X \in A) P(Y \in B)$ for Borel sets $A,B$. Then, I have that $P(f(X) \in C, Y \in B) = P(X \in f^{-1}(C), Y \in B)$, but don't know what to do from here.
Thanks.
It is true for an arbitrary measurable $f$. For if $A$ and $B$ are Borel sets, then \begin{align} \mathbb P(f(X)\in A,Y\in B) &= \mathbb P(X\in f^{-1}(A),Y\in B)\\ &=\mathbb P(X\in f^{-1}(A))\mathbb P(Y\in B),\end{align} so that $f(X)$ and $Y$ are independent.