If $E(Y\mid X)$ is constant then $X, Y$ are uncorrelated.

Solution 1:

If ${\rm E}[X\mid Y]$ is constant, then it must necessarily be equal to its mean ${\rm E}[{\rm E}[X\mid Y]]={\rm E}[X]$. Now use that $$ {\rm E}[XY]={\rm E}[{\rm E}[XY\mid Y]] $$ to conclude that ${\rm E}[XY]={\rm E}[X]{\rm E}[Y]$ which is equivalent to saying that the covariance is zero.

Solution 2:

What you need is the double expectation formula: $$ \DeclareMathOperator{\E}{E} \E(X) = \E \E (X|Y) $$ In the double expectation, the inner expectation is a function of $Y$, that is, a random variable, and the outer expectation then is then taken over the distribution of $Y$. Assume $\E X = \E Y = 0$ (we can do that without loss of geneality, since else, just subtract first the expectation), and then $\E(X | Y)=s$, a known, constant real number. Now calculate $$ \E XY = \E (\E (XY|Y)) = \E ( Y \E(X|Y)) = \E Ys = s\E Y =0. $$

Solution 3:

For X and Y to be uncorrelated we need to show $\rho(X, Y) = 0$

We know, $\rho(X, Y) = \frac{Cov(X,Y)}{\sigma_X\sigma_Y} = \frac{E(XY) - E(X)E(Y)}{\sigma_X\sigma_Y}$

For $\rho(X, Y)$ to be zero, the numerator has to be zero. Therefore it will suffice to show that $E(XY) = E(X)E(Y)$

From the question we know, $E(X|Y) = c$

We can calculate $E(X)$ using rule of Iterated Expectations,

$\begin{align} E(X) & = E[E(X|Y)] \\ & = E(c) \\ & = c \end{align}$

Now, again using rule of Iterated Expectations on $E(XY)$

$\begin{align} E(XY) & = E[E[XY|Y]] \\ & = E[Y E(X|Y)] &\text{;$E(XY|Y)=Y E(X|Y)$ when X and Y are conditionally independent} \\ & = E[Y c] \\ & = c E[Y] \\ & = E(X) E[Y] \end{align}$

Therefore, $\rho(X, Y) = \frac{Cov(X,Y)}{\sigma_X\sigma_Y} = \frac{E(XY) - E(X)E(Y)}{\sigma_X\sigma_Y} = \frac{E(X)E(Y) - E(X)E(Y)}{\sigma_X\sigma_Y} = \frac{0}{\sigma_X\sigma_Y} = 0$


Proof of $E(XY|Y)=Y E(X|Y)$ when X and Y are conditionally independent.

We know if $X_1,...X_n$ be independent random variable, Then

$E(\prod_{i=1}^{n} X_i) = \prod_i E(X_i)$

Now,

$\begin{align} E(XY|Y) & = E(X|Y) E(Y|Y)\\ & = E(X|Y) Y \end{align}$