# Relation between independence and correlation of uniform random variables

My question is fairly simple: let $$X$$ and $$Y$$ be two uncorrelated uniform random variables on $$[-1,1]$$. Are they independent?

I was under the impression that two random, uncorrelated variables are only necessarily independent if their joint distribution is normal. However, I can't come up with a counterexample to disprove the claim I am asking about. Please provide either a counterexample or a proof.

Independent implies uncorrelated but the implication doesn't go the other way.

Uncorrelated implies independence only under certain conditions. e.g. if you have a bivariate normal, it is the case that uncorrelated implies independent (as you said).

It is easy to construct bivariate distributions with uniform margins where the variables are uncorrelated but are not independent. Here are a few examples:

1. consider an additional random variable $$B$$ which takes the values $$\pm 1$$ each with probability $$\frac12$$, independent of $$X$$. Then let $$Y=BX$$.

2. take the bivariate distribution of two independent uniforms and slice it in 4 equal-size sections on each margin (yielding $$4\times 4=16$$ pieces, each of size $$\frac12\times\frac12$$). Now take all the probability from the 4 corner pieces and the 4 center pieces and put it evenly into the other 8 pieces.

3. Let $$Y = 2|X|-1$$.

In each case, the variables are uncorrelated but not independent (e.g. if $$X=1$$, what is $$P(-0.1?)

If you specify some particular family of bivariate distributions with uniform margins it might be possible that under that formulation the only uncorrelated one is independent. Then being uncorrelated would imply independence.

For example, if you restrict your attention to say the Gaussian copula, then I think the only uncorrelated one has independent margins; you can readily rescale that so that each margin is on (-1,1).

Some R code for sampling from and plotting these bivariates (not necessarily efficiently):

n <- 100000
x <- runif(n,-1,1)
b <- rbinom(n,1,.5)*2-1
y1 <-b*x
y2 <-ifelse(0.5<abs(x)&abs(x)<1,
runif(n,-.5,.5),
runif(n,0.5,1)*b
)
y3 <- 2*abs(x)-1

par(mfrow=c(1,3))
plot(x,y1,pch=16,cex=.3,col=rgb(.5,.5,.5,.5))
plot(x,y2,pch=16,cex=.5,col=rgb(.5,.5,.5,.5))
abline(h=c(-1,-.5,0,.5,1),col=4,lty=3)
abline(v=c(-1,-.5,0,.5,1),col=4,lty=3)
plot(x,y3,pch=16,cex=.3,col=rgb(.5,.5,.5,.5))


(In this formulation, $$(Y_2, Y_3)$$ gives a fourth example)

[Incidentally by transforming all of these to normality (i.e. transforming $$X$$ to $$\Phi^{-1}(\frac12(X+1))$$ and so forth), you get examples of uncorrelated normal random variables that are not independent. Naturally they aren't jointly normal.]

• Thank you. I'm struggling to see why the examples you provided still guarantee that $Y$ is uniformly distributed on $[-1, 1]$, though. – Peiffap Mar 17 '19 at 23:34
• Do the plots of the bivariate densities help? In each case the shaded parts are all of constant density – Glen_b -Reinstate Monica Mar 17 '19 at 23:49
• They make it visually clearer, yes. Thank you, again. – Peiffap Mar 17 '19 at 23:51