Does Cov(X,Y)=0 imply E(Y|X)=E(Y)? [closed]

The answer seems no, but how to construct an counterexample?

• @spaceisdarkgreen What I wrote was total nonsense, sorry for that. – Shalop Nov 20 '17 at 5:34

Of course not.

Take $X$ to be a symmetric about zero distribution with $P(X=0) <1$ and $Y$ to be $X^2$. Then, $cov(X,Y) = 0$. But, $E[Y|X] =X^2$ (a non-constant random variable) and $E[Y]$ is some plain old number.

If $X$ is a standard normal, $E[Y|X]$ is $\chi^2$ with 1 degree of freedom, and $E[Y]$ is $1$.

Maybe this is the simplest counterexample:

$X = \begin{cases} \phantom{-}1 \\ \phantom{-}0 & \text{each with probability } 1/3. \\ -1 \end{cases}$

$Y = X^2.$

Then $\operatorname{cov}(X,Y)=0$ and $\operatorname{E}(Y\mid X) = Y = \Big( \text{either$0$or$1$} \Big),$ but $\operatorname{E}(Y) = \dfrac 2 3.$

Let's construct the discrete random variable $X$ with values in $\{-1,0,1\}$, such that $$P(X=0) = \frac{1}{2},$$ $$P(X=-1)=P(X=1)=\frac{1}{4}.$$

Now let's construct $Y$ with values in $\{0,1\}$ such that $$Y= \begin{cases} 1, & \text{if } X=0 \\ 0, & \text{otherwise.} \end{cases}$$

The product random variable, $X\cdot Y$, always takes value 0, so $E(XY)=0$ always, and $E(X)E(Y)=0\cdot\frac{1}{2}=0$, so $Cov(X,Y)=0$.

However, $E(Y|X)=1-X^2$, which depends on the value of $X$, and is either 0 or 1, while $E(Y)=\frac{1}{2}.$