# Show that $Y=Z_1+Z_2$ and $X=|Z_1-Z_2|$ are uncorrelated but not independent.

$Z_1, Z_2$ are $\mathrm{Bin}(n,\frac{1}{2})$ and independent.

Show that $Y=Z_1+Z_2$ and $X=|Z_1-Z_2|$ are uncorrelated but not independent.

My attempt:

$$P(Y=k_Y)=\binom{2n}{k_Y}\left(\frac{1}{4}\right)^n$$ $\forall k_Y \in [0,2n]$

$$P(X=k_X)=2(\frac{1}{4})^n\sum_{j=0}^{j=n-k_X}\binom n j \binom n {j+k_X}$$ $\forall k_X \in [0,n]$

$$P(Y=k_Y,X=k_X)=2(\frac{1}{4})^n\binom n {(k_Y-k_X)/2}\binom n {(k_X+k_Y)/2}$$ if $k_X \in [0,n],k_Y \in [0,2n]$ $k_Y>k_X$ and $k_X \pm k_Y$ are even, $0$ otherwise.

Clear enough $\forall n$ and $k_Y=0$ and $k_X = n$ $P(Y=0) = (\frac{1}{4})^n$ $P(X=n) = 2(\frac{1}{4})^n$ and $P(Y=0,X=n)=0$ thus $P(Y=0)P(X=n) \ne P(Y=0,X=n)$ $\implies$ $X$ and $Y$ are dependent.

Now show that $Cov(X,Y)=E(XY)-E(X)E(Y)=0$.

$E(Y)=n$

$E(X)=2(\frac{1}{4})^n\sum_{x=0}^{n}x\sum_{j=0}^{j=n-x}\binom n j \binom n {j+x}$

\begin{align} E(XY) & =2(\frac{1}{4})^n\sum_{x=0}^{n}\sum_{y=0}^{2n}xy\binom n {(y-x)/2} \binom n {(x+y)/2} \\ & =2(\frac{1}{4})^n \sum_{x=0}^{n}x\sum_{y=x}^{2n-x}y\binom n {(y-x)/2 } \binom n {(x+y)/2} \\ & =2(\frac{1}{4})^n\sum_{x=0}^{n}x\sum_{j=0}^{n-x}(x+2j)\binom n j \binom n {j+x} \end{align}

and here I am stuck...

• More simply, $X$ and $Y$ can be odd or even, but if you know that $X$ is even, you know that $Y$ must also be even. Hence, $X$ and $Y$ are dependent random variables. Commented Feb 14, 2015 at 14:56
• @Dilip Sarwate Thanks, I see your point, do you perhaps also see how to solve the second part of the problem?
– zesy
Commented Feb 14, 2015 at 15:07
• I would say that given $X=k$, the conditional distribution of $Y$ is symmetric about $X=n$ and so $E[Y\mid X] = n$, a constant. Since $E[Y \mid X]$, the minimum-mean-square-error estimator of $Y$ given $X$ is a straight line, the linear minimum-mean-square-error estimator is also the same (horizontal) straight line. The slope of the LMMSE estimator is proportional to $\rho$, the correlation coefficient, and so $\rho$ must be $0$; that is, $X$ and $Y$ must be uncorrelated. Commented Feb 14, 2015 at 15:37

First show that the distribution of $(X,Y)$ is the same as that of $(X,2n-Y)$. Hence

$$\operatorname{cov}(X,Y) = \operatorname{cov}(X,2n-Y) = \operatorname{cov}(X,-Y) = -\operatorname{cov}(X,Y)$$

and uncorrelatedness follows.

As Michael Hardy suggested let's show that the distribution of $(Y,X)$ are the same as $(2n-Y,X)$

$$P(Y=k_Y,X=k_X)=2(\frac{1}{4})^n\binom n {(k_Y-k_X)/2}\binom n {(k_X+k_Y)/2}\text{ if }k_X \in [0,n] ,k_Y \in [0,2n] ,k_Y \ge k_X$$ and $k_X±k_Y$ are even, $0$ otherwise.

$$P(2n-Y=k_Y,X=k_X)=P(Y=2n-k_Y,X=k_X)$$

$$2n-k_Y \in [0,2n]\text{ and }2n-k_Y \ge k_X\text{ (because 2n \ge a+b + |a-b| if a,b \in [0,n]) and 2n-k_Y \pm k_X are even,}$$ thus:

$$P(Y=2n-k_Y,X=k_X)=2(\frac{1}{4})^n\binom n {(2n-k_Y-k_X)/2}\binom n {(k_X+2n-k_Y)/2}=2(\frac{1}{4})^n\binom n {n-(k_Y+k_X)/2}\binom n {n-(k_Y-k_X)/2}=2(\frac{1}{4})^n\binom n {(k_Y-k_X)/2}\binom n {(k_X+k_Y)/2}$$

Because $\binom{n}{k}=\binom{n}{n-k}$.