27
$\begingroup$

Is there a simple example showing that given $X,Y$ uncorrelated (covariance is zero), $X,Y$ are not independent?

I have looked up two references, however, I am dissatisfied with both.

  • In Reference $1$, $X,Y$ are assumed to be independent uniform RVs from $(0,1)$, construct $Z = X+Y, W = X - Y$, then the claim is that $Z,W$ is uncorrelated but not independent. Unfortunately, finding the PDF of $Z,W$ is not trivial.

  • In Reference $2$, $\phi$ is assumed to be uniform RV from $(0, 2\pi)$, and construct $X = \cos(\phi)$, $Y = \sin(\phi)$. Then the claim is that $X,Y$ are uncorrelated but not independent. Unfortunately, the PDFs of $X,Y$ takes on the form of rarely mentioned arcsine distribution.

I just wish to have an example at hand where I can whip out to show that uncorrelated does not necessarily implies independent. Is this do-able?

$\endgroup$
  • 4
    $\begingroup$ Do you really need the joint distributions? In example $1$, for instance, it seems fairly straightforward to calculate $E[ZW]$ without explicitly calculating the distribution of $(Z,W)$. $\endgroup$ – Theoretical Economist Oct 15 '17 at 2:17
  • 1
    $\begingroup$ It is indeed a popular question on stats.stackexchange. $\endgroup$ – StubbornAtom Oct 15 '17 at 14:18
  • $\begingroup$ The PDFs of $Z,$ $W,$ and the joint distribution of $Z$ and $W$ look quite simple to me: the joint distribution is uniform on a square rotated $45$ degrees (which is one of the examples given on stats.SE). And the arcsine distribution may be "rarely mentioned" but it's quite simple. If you are looking for an example that's as often-used as a Gaussian, I think you're out of luck. But you now have a lot of answers to choose from; is there no answer among them that's good enough? $\endgroup$ – David K Oct 17 '17 at 0:01
44
$\begingroup$

Here's a (perhaps) simpler example. Let $X$ be $N(0,1)$ and $Y = X^2.$ Then $$ E(XY) = E(X^3) = 0 =E(X)E(Y)$$ so $X$ and $Y$ are uncorrelated, but clearly they aren't independent (if you know $X$, then you know $Y).$

$\endgroup$
  • 3
    $\begingroup$ This applies to any symmetric distribution, actually (except for the trivial point mass at zero). For example it would apply with $X$ such that $p_X(1)=1/2,p_X(-1)=1/2,p_X(x)=0$ otherwise, where $p_X$ is the PMF. $\endgroup$ – Ian Oct 15 '17 at 2:36
  • 2
    $\begingroup$ @Ian Any nondegenerate, symmetric, integrable RV :). $\endgroup$ – spaceisdarkgreen Oct 15 '17 at 2:39
  • 2
    $\begingroup$ In fact you need a finite third moment, but yes, you do need some integrability hypothesis. $\endgroup$ – Ian Oct 15 '17 at 2:45
  • $\begingroup$ @Ian while we're quibbling here, actually now that I think about it, your example doesn't quite work ($X$ and $X^2$ are independent)... so there is some other nontriviality assumption like $X^2$ is not constant. $\endgroup$ – spaceisdarkgreen Oct 15 '17 at 2:50
  • 3
    $\begingroup$ Oh, yes, $X^2$ in that case has the "trivial independence problem", where conditioning doesn't do anything simply because you already know everything there is to know. OK, so yeah, starting from any nonnegative nondegenerate distribution with finite $3/2$ moment, taking the square root and independently choosing the sign uniformly at random gives an $X$ with the desired properties. That's...a somewhat ugly set of hypotheses :/ $\endgroup$ – Ian Oct 15 '17 at 3:02
25
$\begingroup$

Two fair coins are tossed independently; the first has sides labelled $0$ and $1,$ the second has sides labelled $1$ and $-1.$ Let $X$ be the number that comes up on the first coin, and let $Y$ be the product of the two numbers that come up.

The variables $X$ and $Y$ are uncorrelated: since $XY=Y,$ $$E(XY)=E(Y)=0=\frac12\cdot0=E(X)E(Y).$$ The variables $X$ and $Y$ are not independent: $$P(X=0,Y=0)=P(X=0)=\frac12\ne\frac12\cdot\frac12=P(X=0)P(Y=0).$$

$\endgroup$
15
$\begingroup$

How about $(X,Y)$ taking values $(1,0)$, $(-1,0)$, $(0,1)$ and $(0,-1)$ each with probability $1/4$? Then $E(X)=E(Y)=0$ and $XY=0$, so the covariance is zero, but $X$ and $Y$ are not independent.

$\endgroup$
7
$\begingroup$

Really boring example: $$ \begin{array}{c|ccc} Y \backslash X & -1 & 0 & 1 \\ \hline -1 & p & p & p \\ 0 & p & 1-8p & p \\ 1 & p & p & p \end{array}. $$ Then the marginal distributions are both $$ \begin{array}{ccc} -1 & 0 & 1 \\ \hline 3p & 1-6p & 3p \end{array}, $$ so $E[X]=E[Y]=0$. A similar calculation shows $E[XY]=0$, but an independent joint distribution would have be the product of the marginals, $$ \begin{array}{c|ccc} & -1 & 0 & 1 \\ \hline -1 & 9p^2 & 3p(1-6p) & 9p^2 \\ 0 & 3p(1-6p) & (1-6p)^2 & 3p(1-6p) \\ 1 & 9p^2 & 3p(1-6p) & 9p^2 \end{array}. $$ It is easy to see this corresponds to the original table precisely when $p=1/9$ or $0$: $p$ anything between $0$ and $1/9$ exclusive gives a counterexample.

$\endgroup$
  • 2
    $\begingroup$ An even smaller example is $$ \begin{array}{c|ccc} Y \backslash X & -1 & 0 & 1 \\ \hline -1 & p & 1/2-2p & p \\ 1 & q & 1/2-2q & q \end{array}, $$ which has the same properties, but is not independent unless $p=q$. $\endgroup$ – Chappers Oct 15 '17 at 3:05
5
$\begingroup$

Let $X$ be any symmetric, square integrable random variable, and let $Y$ be independent of $X$, with $P(Y=-1)=P(Y=1)=\frac{1}{2}$.

Then $X$ and $XY$ are trivially uncorrelated, but certainly not independent, as $\lvert X\rvert=\lvert XY\rvert$.

$\endgroup$
5
$\begingroup$

$X$ is uniform over $[-1,1]$. $Y = |X|$ $E[XY]=0$ since it is symmetric about $0$ $Y$ is uniform over $[0,1]$. $Y$ given $X$ is deterministic. So they are not independent.

$\endgroup$
3
$\begingroup$

A very simple example: Let (X,Y) take values from {(0,0), (1,1), (2,0)}, equiprobably. Y is functionally dependent on X, yet the covariance is 0

$\endgroup$
2
$\begingroup$

Another easy to explain on the run:

for $\theta$ Uniform [0 , 2$\pi$] set X = sin($\theta$), Y = cos($\theta$).

Then $X^2 + Y^2 = 1$ - clearly X and Y are not independent.

However as correlation is a linear relationship it is unable to produce anything but zero for the correlation between X and Y

$\endgroup$
  • $\begingroup$ This is the second example that the OP gave in the question. $\endgroup$ – Fabio says Reinstate Monica Oct 18 '17 at 23:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.