Why ranks?
Pearson's \(r\) only measures linear relationships. Sometimes the relationship is curved but still always increasing, or the data are themselves rankings (two judges ordering contestants). Spearman's rank correlation coefficient \(r_s\) asks a simpler question: do higher values of \(x\) go with higher values of \(y\)? It measures how monotonic the relationship is.
How it is calculated
- Rank the \(x\)-values (1 for the smallest or for the largest; be consistent).
- Rank the \(y\)-values in the same direction.
- Calculate Pearson's correlation coefficient of the ranks. That number is \(r_s\).
On the GDC: enter the two lists of ranks and run linear regression or two-variable statistics; the \(r\) it reports is \(r_s\).
Ties
If values are equal, give each the average of the ranks they would share. Values 12, 15, 15, 20 receive ranks 1, 2.5, 2.5, 4 (the two 15s would have been 2nd and 3rd).
A useful check
When there are no ties, \(r_s = 1 - \dfrac{6\sum d^2}{n(n^2 - 1)}\), where \(d\) is the difference between paired ranks. This formula is not required but is a quick check.
Worked example
Two judges rank five singers:
| Singer | P | Q | R | S | T |
|---|---|---|---|---|---|
| Judge A | 1 | 2 | 3 | 4 | 5 |
| Judge B | 2 | 1 | 4 | 3 | 5 |
The differences are \(-1, 1, -1, 1, 0\), so \(\sum d^2 = 4\) and \(r_s = 1 - \dfrac{6 \times 4}{5 \times 24} = 0.8\). The GDC, using the ranks as lists, gives the same 0.8. The judges agree strongly.
Interpreting \(r_s\)
- \(r_s = 1\): perfect agreement in order (as one increases the other always increases).
- \(r_s = -1\): perfectly reversed order.
- Close to 0: no consistent monotonic pattern.
Describe strength with the same words used for Pearson (weak, moderate, strong) and always in context.
Pearson or Spearman?
| Situation | Better choice |
|---|---|
| Points lie roughly on a straight line | Pearson |
| Curved but always increasing or decreasing | Spearman |
| Data are already ranks or ordinal grades | Spearman |
| An extreme outlier is present | Spearman is less affected |
For example, \(y = x^3\) on positive \(x\) gives \(r_s = 1\) but Pearson's \(r\) below 1, since the points are not on a line.
Effect of outliers
An outlier can drag Pearson's \(r\) a long way because it uses the actual distances. With ranks, the most extreme value just becomes rank \(n\), so its influence is limited.
Common mistakes
- Ranking \(x\) from smallest and \(y\) from largest, which flips the sign.
- Giving tied values different ranks instead of the average.
- Typing the original data rather than the ranks into the GDC.
- Concluding causation from a high \(r_s\).
Exam tips
- Show the rank table; it earns method marks.
- When asked to justify the choice of Spearman, mention "non-linear but monotonic", "ranked data" or "outlier".
- Give \(r_s\) to 3 significant figures and then interpret it in one sentence.