Showing $X$, $Y$ are not independent but $\operatorname{Cov}[X, Y] = 0$

3k Views Asked by At

A pair $(X, Y)$ is a point on a single circle $\{(x, y) \mid x^2 + y^2 \le 1\}$. Place this point in the form It is determined randomly and uniformly distributed.

What I want to show is $X$ and $Y$ are not independent But $\operatorname{Cov}[X, Y] = 0.$

3

There are 3 best solutions below

4
On BEST ANSWER

Maybe you would like to consider the approach that doesn't require explicitly writing down the densities (formally it can be done with indicator function and Dirac Delta and is not really very advanced).

The calculation-free approach below is applicable for both uniform over the circle or over the disk.


To show $Cov[X,Y] = E[XY] - E[X]E[Y]\overset{?}{=}0$, it suffices to notice that

$E[X] = 0$ due to mirror (refection) symmetry with respect to the $y$-axis. Similarly, $E[Y] = 0$ due to symmetry about the $x$-axis.

$E[XY] = 0$ for the following reasons. The product $xy$ has a magnitude that is four-fold symmetric in the four quadrants, while the sign of $xy$ in the four quadrants are alternating: positive in 1st, negative in 2nd, positive in 3rd, and negative in 4th. Whatever the joint density $f_{XY}(x,y)$ looks like, it is also four-fold symmetric and the integral $\int xy\cdot f_{XY}(x,y) dxdy$ is going to have the four parts that cancel exactly.

Thus $Cov[X,Y] = E[XY] - E[X]E[Y] = 0 - 0 = 0$


The fact that $X$ and $Y$ are dependent is simply because that the range (a.k.a the domain, or the support) of $X$ is a function of $Y$ and vice versa. When the the range depends on the other one, there's your dependency.

As long as by definition your 2-dim distribution is zero "outside" where $x^2+y^2>1$, the two random variables (the two coordinates) are dependent. This has nothing to do with uniformity or symmetry.

0
On

Here is what I guess you are supposed to do. I don't want to work the problem, but to illustrate ideas. So I'm using simulation as a way to make pictures and to get approximate results (roughly speaking, usually accurate to 2 places).

Start with $X \sim \mathsf{Unif}(-1,1),$ and independently $X \sim \mathsf{Unif}(-1,1).$ Their joint distribution is uniform on the square with vertices at $(-1,-1)$ and $(1,1).$

Then condition on the values outside the unit circle. That conditional distribution is uniform on the unit circle. However, in the conditional distribution $X$ and $Y$ are no longer independent, as you have noted. An easy way to see this is that $P(X > .75|X^2 + Y^2 \le 1) > 0$ and $P(Y > .75|X^2 + Y^2 \le 1) > 0,$ but $P(X > .75, Y > .75|X^2 + Y^2 \le 1) = 0,$ not $P(X > .75|X^2 + Y^2 \le 1) \times P(Y > .75|X^2 + Y^2 \le 1) > 0.$

# generate 100,000 points in unit square
set.seed(1016);  m = 10^5
x = runif(m, -1,1);  y = runif(m, -1,1)
circ = (x^2 + y^2 <= 1);  sum(circ)     # points inside unit circle
## 78555                                # fraction of points inside circle
pi/4
## 0.7853982                            # fraction of area inside circle

# conditional distribution on circle
x.c = x[circ]; y.c = y[circ]
plot(x, y, pch=".", col="grey")         # plot all 100,000 points (color grey)
points(x.c, y.c, pch=".", col="blue")   # color those inside circle blue

It only takes one example where the product of probabilities is not the probability of the intersection to show independence. A small square at upper-right (inside the square, outside the circle) provides a convenient case.

# focus on small square in upper-right corner
abline(v=.75, col="red");  abline(h=.75, col="red")
mean(x.c > .75); mean(y.c > .75)
##  0.0719114                           # aprx P(X > .75|Circle)
##  0.07126217                          # aprx P(Y > .75|Circle)
mean(x.c > .75)*mean(y.c > .75)
##b 0.005124563                         # aprx product
mean((x.c > .75) & (y.c > .75))
##  0                                   # P(X>.75,Y>.75|Circle) = 0

Unconditionally, inside the unit square $X$ and $Y$ are independent so their population correlation is $\rho = 0$ and the sample correlation of the 100,000 points observed is $r \approx 0.$

By contrast, within the unit circle the conditional distribution of $X$ and $Y$ is not independent. We have seen this because of the 0 probability in the small (red) square. However, within the circle the population correlation is $\rho_c = 0$ and the sample correlation is the 78,555 points inside the circle is $r_c \approx 0.$

cor(x,y)
## 8.206786e-05  # aprx 0
cor(x.c,y.c)
## 0.0002690579  # aprx 0

enter image description here

The unconditional bivariate PDF in the square is $f_{X,Y}(x,y) = 1/4,$ for $-1 <x,y<1.$ The conditional PDF in the circle is $f_{X,Y|C}(x,y) = 1/\pi,$ for $x^2 + y^2 < 1.$ To find the conditional correlation, you need to find the conditional covariance, and that is conveniently found by evaluating $E(XY|X^2+Y^2<1)=0.$ So you need to integrate over the circle (perhaps one quadrant at a time, so you can see how the pieces cancel to 0 by symmetry).

2
On

Use Polar Coordinates, such that $X=R\cos\Theta, Y=R\sin\Theta$.   Due to uniform distribution of $(X,Y)$ over the disc, $\Theta\sim\mathcal{U}[0;2\pi)$ and $R,\Theta$ are independent. Then we have that:

$\begin{split}\mathsf E(X)&=\mathsf E(R\cos\Theta)\\&=\mathsf E(R)~\mathsf E(\cos\Theta)\\\mathsf E(Y)&=\mathsf E(R)~\mathsf E(\sin\Theta)\\ \mathsf E(XY)&=\mathsf E(R^2)~\mathsf E(\cos(\Theta)\sin(\Theta))\\&=\tfrac 12\mathsf E(R^2)~\mathsf E(\sin(2\Theta))\end{split}$

Hint: firstly evaluate the expectations for trig functions of $\Theta$ when $f_\Theta(\theta)=\tfrac 1{2\pi}\mathbf 1_{\theta\in[0;2\pi)}$.


Note: If the distribution is over a circle rather than the disc, $R\sim\delta(1)$. Otherwise the same principle applies.