Does $\mathbb{E}[g(X)Y]=0$ for all functions $g$ imply $\mathbb{E}[Y|X]=0$?

80 Views Asked by At

Is there any result saying something like $$\mathbb{E}[g(X)Y]=0 \,\,\forall g\in\mathcal{G}\,\,\,\implies\mathbb{E}[Y\mid X]=0$$ where $\mathcal{G}$ is some function class? Have been searching online but didn't find anything useful.

Context: I came across a paper where the objective function is of the form $\mathbb{E}[(X-Y)\mid X]=0$ but the authors instead use $\mathbb{E}[g(X)(X-Y)]=0$ for a class of $g\in\mathcal{G}$ in their actual implementation. I understand the reason is to avoid the conditional moment and replace it by the unconditional one, but are the two moments equivalent (the if direction is easy to show so I'm wondering the other direction...)?