# Correlation and dependence between $X$ and $Y:=X^2$

If we say $X$ has a uniform distribution on $\{-1,0,1\}$ and let $Y=X^2$, are $X$ and $Y$ uncorrelated and are they independent? I would say that they are not independent since $Y$ clearly depends on $X$, but a friend told me that that's not correct. How would I show that they are dependent? (Or maybe he is correct?)

Also I said that they were correlated because $Y$ changes as $X$ changes, meaning correlation right? I'm just feeling doubtful now. Some help please?

-
Can you edit your question title to something more specific/informative? – JohnD Dec 13 '12 at 17:04

## 2 Answers

Consider for example $\mathbb{P}[X=-1,Y=1]$:

$$\mathbb{P}[X=-1,Y=1] = \mathbb{P}[X=-1] = \frac{1}{3}$$

using that $Y=X^2$, but on the other hand

$$\mathbb{P}[X=-1] \cdot \mathbb{P}[Y=1] = \frac{1}{3} \cdot \frac{2}{3} = \frac{2}{9} \not= \frac{1}{3}$$

This means that $X$, $Y$ cannot be independent.

Concerning correlation: Obviously $\mathbb{E}X = 0$ and

$$\mathbb{E}(X \cdot Y) = \mathbb{E}(X^3) = \frac{1}{3} \cdot (-1)^3+ \frac{1}{3} \cdot 0 + \frac{1}{3} \cdot 1^3 = 0 = \mathbb{E}X \cdot \mathbb{E}Y$$

... so by definition $X$ and $Y$ are uncorrelated.

-

\begin{align}X: \binom{-1 \\0 \\1}\ w.p \binom {1/3 \\1/3\\ 1/3}\\\\ Y: \binom{\\0 \\1}\ w.p \binom {1/3 \\ 2/3}\\\\ XY: \binom{-1 \\0 \\1}\ w.p \binom {1/3 \\1/3\\ 1/3}\\\\ E(X)=0\\ E(Y)=2/3\\ E(X)=0\\ E(XY)=0\\ E(X)E(Y)=0 \end{align} Uncorrelated!

Also, \begin{align} p_{Y|X}(y|X=x)&=\begin{cases} 1&x=-1,1\\0&x=0 \end{cases}\\ &\neq p_Y(y) \end{align}

-