12

Is it possible to construct two random variables $X, Y$ both of them assuming exactly two non-zero values which are uncorrelated, i. e. $\mathbf{E}[X \, Y] = \mathbf{E}[X]\,\mathbf{E}[Y]$, but not independent?

If that is not possible, what is the simplest example of non-zero discrete random variables which are uncorrelated but not independent?

Thanks a lot!

Qyburn
  • 1,777
  • Uncorrelated Bernoulli random variables are independent hence the simplest example might be $X$ uniform on ${-1,0,1}$ and $Y=ZX$ with $Z$ Bernoulli uniform on ${-1,1}$ and independent of $X$. Then $(X,Y)$ is not independent since $P(X=Y=0)=P(X=0)=1/3$ while $P(X=0)=P(Y=0)=1/3$, but $E(X)=E(Y)=0$ and $E(XY)=E(Z)E(X^2)=0$. hence the correlation of $(X,Y)$ is indeed zero. – Did Apr 01 '15 at 06:28
  • 1
    See image https://commons.wikimedia.org/wiki/File:Correlation_examples.png used in https://en.wikipedia.org/wiki/Talk:Correlation_and_dependence/Archive_1#The_first_image – CiaPan Apr 01 '15 at 10:01
  • Does "assuming exactly two non-zero values" mean that it can assume three values, one of which is zero, or that it assumes two values, which are nonzero? – JiK Apr 01 '15 at 10:32
  • @JiK: I meant "two values which are nonzero" but if you have an example for "three values, one of which is zero", could you post it? Thanks! – Qyburn Apr 14 '15 at 15:35
  • https://math.stackexchange.com/q/249422/321264 – StubbornAtom Apr 18 '21 at 10:54

2 Answers2

21

Let $X$ be a standard normal random variable and let $Y = X^2$.

Then, since $E(X) = E(X^3) = 0$, we have $E(XY) = E(X^3) = 0 =E(X)E(Y).$

However, they are not independent:

$$P(0<X<1,Y>1) = 0 \neq P(0<X<1)P(Y>1)$$

For a simple discrete example, let $X_1$ and $X_2$ be independent random variables each taking values in $\{0,1\}$ with $P(X_i = 0) = P(X_i=1) = 1/2$. Let $X = X_1 + X_2$ and $Y = X_1 - X_2$.

We have $E(X) = 1$, $E(Y) = 0$ and $E(XY) = 0$. Hence, $E(XY) = E(X)E(Y)$.

But $P(X=0,Y=0) = 1/4 \neq P(X=0)P(Y=0) = 1/8.$

RRL
  • 92,835
  • 7
  • 70
  • 142
3

enter image description here

A simpler discrete example: Let $(X,Y)$ take values $(0,0)$, $(1,1)$, and $(2,0)$ with equal probability. Then:

  • $E(XY)= 0\cdot 0\cdot \frac13 + 1\cdot 1\cdot\frac13 + 2\cdot0\cdot\frac13=\frac13$

  • $E(X) = 0\cdot\frac13 + 1\cdot\frac13 + 2\cdot\frac13 = 1$

  • $E(Y) = 0\cdot\frac13 + 1\cdot\frac13 + 0\cdot\frac13=\frac13$

so that $\operatorname{Cov}(X,Y)=E(XY)-E(X)E(Y)=0$ and the correlation between $X$ and $Y$ is zero. This zero correlation quantifies the fact that the relationship between $X$ and $Y$ exhibits no linear trend either upward or downward.

However, $X$ and $Y$ are not independent. Here are two ways to argue:

  • $P(X=1,Y=1)=\frac13\ne \frac13\frac13=P(X=1)P(Y=1)$.
  • Given $X=1$, you know $Y=1$ for sure, so that $P(Y=1\mid X=1)=1$. This differs from the unconditional probability $P(Y=1)=\frac13$.

Three possible values for the pair $(X,Y)$ is the simplest situation where discrete random variables can be uncorrelated but not independent. When the pair $(X,Y)$ takes two possible values and $X$ and $Y$ are uncorrelated, then they are also independent.

Proof: Since covariance is preserved under translation, wlog we may assume $(X,Y)$ takes value $(a,b)$ with probability $p\ne0$ and value $(0,0)$ with probability $q:=1-p\ne0$. Compute $E(XY)=abp$, $E(X)=ap$, $E(Y)=bp$, and $\operatorname{Cov}(X,Y)=abpq$. If the covariance equals zero, then either $a=0$ or $b=0$. If $a=0$ then $b\ne0$ and $P(X=0)=P(X=a)=1$ while $P(Y=b)=p$ and $P(Y=0)=q$. Hence $P(X=0,Y=0)=P(X=0)P(Y=0)$ and $P(X=a,Y=b)=P(X=a)P(Y=b)$ and we have independence. The case $b=0$ is similarly proved; or argue by symmetry, swapping $X,a$ with $Y,b$.

grand_chat
  • 40,909