# Is $f(x)\equiv 0$ necessary condition for $\mathbb{E}[Xf(X)\mathbb{1}_{[0,\infty)}(X)]=0$?

I have the following question:

Let $$X\sim\mathcal{N}(0,1)$$ and $$\mathbb{E}[Xf(X)\mathbb{1}_{[0,\infty)}(X)]=0$$. Clearly it is sufficient that $$f(x)=0$$ for all values of the domain. Is it also a necessary condition?

So I separated the function $$f$$ into its positive and negative parts $$f=f^{+}-f^{-}$$. It follows that $$\mathbb{E}[Xf^{+}(X)\mathbb{1}_A]>0$$ for $$A:=\{\omega: g(X(\omega))>0\}$$. Now I need to show that $$\mathbb{P}(A)=0$$ but I'm not sure how to proceed. Do I need to use some sort of 0-1 law? The help would be much appreciated.

• What is the meaning of $1_{[0,\infty)}$. You probably mean $1_{[0,\infty)}(X)$. Mar 9, 2019 at 12:05
• yes, that's what I mean
– max
Mar 9, 2019 at 12:08

It does not follow that $$f$$ is $$0$$. Example: take $$f(x)=a$$ for $$0 and $$f(x)=b$$ for $$1 . Then the hypothesis becomes $$a\int_0^{1}x\phi(x)dx+b\int_1^{\infty} x \phi(x)dx=0$$ where $$\phi$$ is the standard normal density function. It is clear that you can choose non-zero $$a$$ and $$b$$ satisfying this equation.