I'm doing some practice questions in my statistics book, and started doing this one:
Find Spearman's rank correlation coefficient between X and Y for this set of data:
$X$ $13$ $20$ $22$ $18$ $19$ $11$ $10$ $15$
$Y$ $17$ $19$ $23$ $16$ $20$ $10$ $11$ $18$
I set out the data in a table, and found the difference between each value.
$d$ $4$ $1$ $1$ $2$ $1$ $1$ $1$ $3$$d^2$ $16$ $1$ $1$ $4$ $1$ $1$ $1$ $9$
From this we can see that $\Sigma d^2 = 34$
I then calculated $r_s$ using the formula $r_s = 1- \frac{6\Sigma d^2}{n(n^2 -1)}$:
$r_s = 1- \frac{6\Sigma d^2}{n(n^2 -1)}$
$=1 - \frac{6*34}{8*63}$
$= 1- \frac{204}{504}$
$\approx 0.5952$
However, in the book the answer is given as $0.881$. So, am I wrong or is the book wrong?