Intuition why pulling out $\mathcal{G}$-measurable $X$ of $E[f(X,Y)|\mathcal{G}]$ requires $Y$ indep of $\mathcal{G}$

84 Views Asked by At

Given $\mathcal{G}$ a sigma-field and $X$ a $\mathcal{G}$-measurable random variable, on an intuitive level, why do we need $Y$ to be independent of $\mathcal{G}$ to pull out $X$ from the conditional expectation? $$E[f(X,Y)|\mathcal{G}]=E[f(x,Y)]|_{x=X}$$ I understand that if $X$ is $\mathcal{G}$-measurable, it means if we know $\mathcal{G}$ we know $X$ as well so the best guess of $X$ given the $\mathcal{G}$ information is $X$ itself which makes sence. But what about the independence requirement?