# A problem on correlation and independence

Here is a little challenge/problem for you guys.

Let $(X,Y)$ be jointly discrete RVs such that each have at most two mass points (not necessarily $1$ and $0$, i.e. not necessarily indicator variables). Suppose $X$ and $Y$ are uncorrelated. Are they independent?

-

Since you're dealing with correlation, you can restrict consideration to 0-1 variables without loss of generality. Any linear rescaling of the 0-1 variables to $a$ and $b$ leaves the correlation unaltered. So if it's true of 0-1 variables, it's true of distributions with mass points at some arbitrary $a$ and $b$, with $a\neq b$.

Since the Pearson correlation for binary variables is the phi coefficient, and $n \phi^2$ is the chi-square, the immediate implication for binary variables is that zero correlation implies independence.

-
Great reasoning! :) This is elegant. :) – math_stat_enthusiast Dec 31 '13 at 19:37
I started by doing the first line of the algebra; realized I already knew the answer and thought - "why not just explain why I know?" – Glen_b Dec 31 '13 at 19:39
That's good enough. I was actually looking for the answer that one can linearly rescale any set of dichotomous RVs into indicator variables without affecting the correlation, which you did! :) – math_stat_enthusiast Dec 31 '13 at 19:43

Here is an answer with no jargon about $\chi^2$ random variables statistics.

If $X$ and $Y$ are Bernoulli random variables with parameters $p$ and $q$ respectively, then $E[X] = p = P\{X=1\}$ and $E[Y] = q = P\{Y=1\}$. Also, $$E[XY] = 1\cdot 1\cdot P\{X=1,Y=1\} = P\{X=1,Y=1\}.$$ Now, if the random variables $X$ and $Y$ are uncorrelated, then $$\operatorname{cov}(X,Y) = E[XY]-E[X]E[Y] = 0 ~\Rightarrow ~E[XY] = pq$$ which shows that $P\{X=1, Y = 1\} = P\{X=1\}P\{Y=1\}$, that is, the events $\{X=1\}$ and $\{Y=1\}$ are independent events. It follows from standard properties of two independent events that the events $\{X=1\}$ and $\{Y=0\}$ also are independent events, as are $\{X=0\}$ and $\{Y=1\}$, as well as $\{X=0\}$ and $\{Y=0\}$. In other words, $$P\{X=i, Y=j\} = P\{X=i\}P\{Y=j\}~ \text{for all}~ i,j \in \{0,1\}$$ showing that $X$ and $Y$ are independent random variables.

Now, if $X$ and $Y$ are any independent random variables, then so are $g(X)$ and $h(Y)$ independent random variables (for arbitrary measurable functions $g$ and $h$), so that if $X$ and $Y$ are uncorrelated Bernoulli random variables, and thus independent random variables, $aX+b$ and $cY+d$ are also independent random variables and hence uncorrelated random variables. The latter can also be inferred using Glen_b's remark that linear transformations don't affect the covariance and the (Pearson) correlation coefficient, that is, \begin{align}\operatorname{cov}(aX+b, cX+d) &= \operatorname{cov}(X,Y),\\ \rho_{aX+b,cY+d} &= \rho_{X,Y}\end{align}

-
The previous answer makes no reference to $\chi^2$ random variables (which aren't involved in this problem): it invokes the fact that a $\chi^2$ statistic (which is based on squared differences) can be zero only in a very special circumstance. The economy of its argument is noteworthy. – whuber Dec 31 '13 at 21:51
+1 It's good to put this argument as well; it's a (better) version of the line argument I began to write before I decided to post the one I did. (I had planned to come back and add such an argument in later; yours is no doubt better than what I'd have written) – Glen_b Dec 31 '13 at 22:34