Spearman against Pearson on the same numbers, and ranking up or down: does ΣD² change?
When the data are numbers, we can calculate both coefficients, and they usually give similar values. They differ because they answer different questions. Pearson’s r measures how well the dots follow a straight line. Spearman’s r measures how well one list follows the other in order, whatever the shape. If y increases every time x increases, Spearman gives exactly 1, even if the dots lie on a curve; Pearson gives less than 1. Spearman is also not disturbed by one extreme value, because an extreme value is just the last rank. Now the direction of ranking: if both lists are ranked from the largest instead of the smallest, every rank k becomes n + 1 − k in both lists, so every D only changes sign and D² stays the same. So ΣD² and r are unchanged, as long as both lists are ranked in the same direction. If you rank one list up and the other down, r changes sign.
| Pupil | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Ranked from smallest: D | 2 | 0 | −1 | 0 | −1 |
| Ranked from largest: D | −2 | 0 | 1 | 0 | 1 |
Take x = 1, 2, 3, 4, 5 and y = 2, 3, 4, 5, 60. Rank both lists and find Spearman’s r. Then guess whether the one huge value 60 makes Pearson’s r much smaller than 1, and check your guess with the five sums.