Prove $ 1-\frac{\sum{(z_x - z_y)}^2}{2(n-1)} $ = $\frac{\sum{(z_x*z_y)}}{n-1}$

171 Views Asked by At

I am trying to prove the following equality through algebraic means based on the textbook Applied multiple regression/correlation analysis or the behavioural sciences by Cohen et al. (pages 27-28) The formulas are supposedly for the Pearson Correlation Coefficient.

$$ 1-\frac{\sum{(z_x - z_y)}^2}{2(n-1)} = \frac{\sum{(z_x*z_y)}}{n-1}$$

Here $z_x$ and $z_y$ represent z scores for (scores that have been transformed by subtracting the mean from them and dividing by the standard deviation) for two different variables. You are summing over the total number of pairs of scores.

I have tried by manipulating the left hand side of the equation by expanding the terms and converting the 1 to $\frac{n-1}{n-1}$ but I am having no success. Apparently the left hand side can be converted to the right hand side of the equation using only basic algebra. Can someone tell me what I am missing.

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

I'll use the notation from the book.

So, the z score is calculated as $z_X=\frac{X-M_X}{sd_X}=\frac x{sd_X}$, where $M_X$ is the sample mean of $X$, $x=X-M_X$ and $sd_X=\sqrt{\frac{\sum x^2}{n-1}}$ is the sample standard deviation.

First let's calculate the sum of squared z scores: \begin{align} \sum z_X^2&=\sum \left(\frac x{sd_X}\right)^2\\&=\frac1{(sd_X)^2}\sum x^2\\ &=\frac{n-1}{\sum x^2}\sum x^2\\&=n-1. \end{align} The same goes for $Y$, i.e. $\sum z_Y^2=n-1$. Then we easily see: \begin{align}\sum(z_X-z_Y)^2&=\sum(z_X^2-2z_X*z_Y+z_Y^2)\\ &=\sum z_X^2 + \sum z_Y^2 -2\sum z_X*z_Y\\&=2(n-1)-2\sum z_X*z_Y\end{align}

Now the conclusion follows directly: \begin{align} 1-\frac{\sum(z_X-z_Y)^2}{2(n-1)}&=1-\frac{2(n-1)-2\sum z_X*z_Y}{2(n-1)}\\ &=\frac{\sum z_X*z_Y}{n-1}. \end{align}