50
$\begingroup$

Any hard-working student is a counterexample to "all students are lazy".

What are some simple counterexamples to "if random variables $X$ and $Y$ are uncorrelated then they are independent"?

$\endgroup$
8
  • 17
    $\begingroup$ I think this is a duplicate, but I'm too lazy to search for it. Take $X\sim N(0,1)$ and $Y=X^2$. $cov(X,Y)=EX^3=0$, but clearly the two variables are not independent. $\endgroup$
    – mpiktas
    Feb 4, 2014 at 7:13
  • 1
    $\begingroup$ a simple example (though there are perhaps even simpler ones) $\endgroup$
    – Glen_b
    Feb 4, 2014 at 9:03
  • 3
    $\begingroup$ Take $U$ to be uniformly distributed on $[0,2\pi]$ and $X=\cos U$, $Y = \sin U$. $\endgroup$ Feb 4, 2014 at 14:34
  • $\begingroup$ Because the sense of "simplest" is undefined, this question is not objectively answerable. I chose the duplicate at stats.stackexchange.com/questions/41317 on the basis of simplest=smallest sum of cardinalities of supports of the marginal distributions. $\endgroup$
    – whuber
    Feb 4, 2014 at 14:55
  • 3
    $\begingroup$ @whuber: Even though "simplest" is indeed not very well defined, the answers here, e.g. the answer by Glen_b are clearly providing much more simple example than the thread you closed this one as a duplicate of. I suggest to reopen this one (I have voted already) and perhaps make it CW to highlight the fact that "simplest" is poorly defined and OP is perhaps asking for various "simple" examples. $\endgroup$
    – amoeba
    Mar 4, 2016 at 22:02

8 Answers 8

36
$\begingroup$

Let $X\sim U(-1,1)$.

Let $Y=X^2$.

The variables are uncorrelated but dependent.

Alternatively, consider a discrete bivariate distribution consisting of probability at 3 points (-1,1),(0,-1),(1,1) with probability 1/4, 1/2, 1/4 respectively. Then variables are uncorrelated but dependent.

Consider bivariate data uniform in a diamond (a square rotated 45 degrees). The variables will be uncorrelated but dependent.

Those are about the simplest cases I can think of.

$\endgroup$
2
  • $\begingroup$ Are all random variables which are symmetric and centered around 0 uncorrelated? $\endgroup$ Feb 11, 2015 at 9:04
  • 1
    $\begingroup$ @moose Your description is ambiguous. If you mean "if $X$ is symmetric about zero and $Y$ is symmetric about zero" then no, since a bivariate normal with standard normal margins can be correlated, for example. If you mean"if $X$ is symmetric about zero and $Y$ is an even function of $X$", then as long as the variances exist I believe the answer is yes. If you mean something else you'll have to explain. $\endgroup$
    – Glen_b
    Feb 11, 2015 at 9:58
28
$\begingroup$

I think the essence of some of the simple counterexamples can be seen by starting with a continuous random variable $X$ centered on zero, i.e. $E[X]=0$. Suppose the pdf of $X$ is even and defined on an interval of the form $(-a,a)$, where $a>0$. Now suppose $Y=f(X)$ for some function $f$. We now ask the question: for what kind of functions $f(X)$ can we have $Cov(X,f(X))=0$?

We know that $Cov(X,f(X))=E[Xf(X)]-E[X]E[f(X)]$. Our assumption that $E[X]=0$ leads us straight to $Cov(X,f(X))=E[Xf(X)]$. Denoting the pdf of $X$ via $p(\cdot)$, we have

$Cov(X,f(X))=E[Xf(X)]=\int_{-a}^{a}xf(x)p(x)dx$.

We want $Cov(X,f(X))=0$ and one way of achieving this is by ensuring $f(x)$ is an even function, which implies $xf(x)p(x)$ is an odd function. It then follows that $\int_{-a}^{a}xf(x)p(x)dx=0$, and so $Cov(X,f(X))=0$.

This way, we can see that the precise distribution of $X$ is unimportant as long as the pdf is symmetric around some point, and any even function $f(\cdot)$ will do for defining $Y$.

Hopefully, this can help students see how people come up with these types of counterexamples.

$\endgroup$
9
$\begingroup$

We can define a discrete random variable $X\in\{-1,0,1\}$ with $\mathbb{P}(X=-1)=\mathbb{P}(X=0)=\mathbb{P}(X=1)=\frac{1}{3}$

and then define $Y=\begin{cases}1,\quad\text{if}\quad X=0\\0,\quad\text{otherwise}\end{cases}$

It can be easily verified that $X$ and $Y$ are uncorrelated but not independent.

$\endgroup$
1
  • $\begingroup$ How do you show cov(X,Y) is zero? $\endgroup$
    – eet
    Nov 7, 2022 at 5:14
8
$\begingroup$

Be the counterexample (i.e., hard-working student)! With that said:

I was trying to think of a real world example and this was the first that came to my mind. This will not be the mathematically simplest case (but if you understand this example, you should be able to find a simpler example with urns and balls or something).

According to some research, the average IQ of men and women is the same, but the variance of male IQ is greater than the variance of female IQ. For concreteness, let's say that male IQ follows $N(100, \sigma^2)$ and female IQ follows $N(100, \alpha \sigma^2)$ with $\alpha<1$. Half the population is male and half the population is female.

Assuming that this research is correct:

What is the correlation between gender and IQ?

Are gender and IQ independent?

$\endgroup$
4
$\begingroup$

I ran across the example of a short straddle in this "Mini-lesson" by Nassim Taleb.

The payoff has the shape of an inverted V with the peak when the price of the underlying security at expiration is the strike price at which both the call and the put are sold. The idea is that if at the last closing Microsoft shares were \$248.15 and we sell a \$247.50 call for May 21, and a put at the same price and same date, the purchasers will be betting on the price going up (call) or down (put) - i.e. their bets are in opposite directions, but each is betting in the price to move even higher than today's (since the option strike price above the current price will be priced into the option), in the case of the call purchaser; or lower than the strike price (put).

If the price of Microsoft is the strike price the seller of the short straddle cashes in the maximum profit from both unexercised options.

There is a clear dependency between the price of the underlying stock and the profit for the options trader, yet there is a zero correlation because both components move in symmetrical and opposite directions.

$\endgroup$
3
$\begingroup$

Try this (R code):

x=c(1,0,-1,0);  
y=c(0,1,0,-1);  

cor(x,y);  
[1] 0

This is from the equation of circle $x^2+y^2-r^2=0$

$Y$ is not correlated with $x$, but it is functionally dependent (deterministic).

$\endgroup$
4
  • 1
    $\begingroup$ Sample correlation zero does not mean that the true correlation is zero. $\endgroup$
    – mpiktas
    Feb 4, 2014 at 9:04
  • 3
    $\begingroup$ @mpiktas If those four values represent a bivariate distribution each with probability 1/4, the cor function returning zero will indicate a population correlation of zero. $\endgroup$
    – Glen_b
    Feb 4, 2014 at 11:04
  • $\begingroup$ @Glen_b I should have made better comments on the code. This might not be known to all. You can use semicolons thought I think it is not recommended as a coding style in R. $\endgroup$
    – Analyst
    Feb 4, 2014 at 11:51
  • 1
    $\begingroup$ @Glen_b yes you are correct. But this was not stated. Nice observation btw. $\endgroup$
    – mpiktas
    Feb 4, 2014 at 14:10
1
$\begingroup$

The only general case when lack of correlation implies independence is when the joint distribution of X and Y is Gaussian.

$\endgroup$
2
  • 3
    $\begingroup$ This doesn't directly answer the question by producing a simple example - in that sense, it is more of a comment - but it does provide an indirect answer, in that it suggests a very wide set of possible examples. It might be worth rephrasing this post to make clearer how it answers the original question. $\endgroup$
    – Silverfish
    Sep 23, 2017 at 21:46
  • $\begingroup$ This answer confuses "distribution" with "family of distributions." It does not address the question. $\endgroup$
    – whuber
    Oct 25 at 18:21
-3
$\begingroup$

A two-sentence answer: the clearest case of uncorrelated statistical dependence is a non-linear function of a RV, say Y = X^n. The two RVs are clearly dependent but yet not correlated, because correlation is a linear relationship.

$\endgroup$
2
  • $\begingroup$ Unless for some very specific distributions of $X$, the RVs $X$ and $Y=X^n$ will usually be correlated. $\endgroup$ Sep 18, 2017 at 23:45
  • $\begingroup$ This answer is incorrect. In R: Expression: {x <- runif(100); cor(x, x^3)} Result: 0.9062057 $\endgroup$
    – Josh
    Sep 19, 2017 at 0:31

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