All subjects · Mathematics · WST03 Statistics 3
Spearman's rank correlation coefficient
Edexcel IAL Mathematics · WST03 Statistics 3
Spearman's rank correlation coefficient measures how closely two sets of rankings agree. It works on ranks, so it detects any steadily increasing or decreasing relationship, not only a straight-line one.
The formula
Rank each variable separately (1 for the smallest or for the best, but the same way for both). Find d, the difference in ranks for each item, then
r_s = 1 - 6Σd2 / (n(n2 - 1)).
It lies between -1 and 1: r_s = 1 means identical rankings, r_s = -1 exactly reversed rankings. Examiners report candidates forgetting to subtract from 1.
| Contestant | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| Judge 1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| Judge 2 | 2 | 1 | 4 | 3 | 6 | 8 | 5 | 7 |
Ranks given by two judges
Example
For the judges: d = -1, 1, -1, 1, -1, -2, 2, 1, so Σd2 = 14.0. r_s = 1 - 6 × 14.0/(8 × 63) = 1 - 84/504 = 0.8333: strong agreement between the judges.
When to use Spearman rather than the PMCC
Use Spearman's when:
- the data are given as ranks or are subjective judgements;
- the relationship looks non-linear but monotonic (always increasing or always decreasing);
- the data are not from a bivariate normal distribution (so the PMCC test is not valid).
The PMCC measures linear correlation of the actual values; Spearman's measures agreement of the ranks.
Tied ranks
Exam questions are not set with ties, but you should know the method: tied values share the mean of the ranks they would have occupied. Values 12, 15, 15, 18 get ranks 1, 2.5, 2.5, 4. With ties, the formula for r_s is only approximate; the exact method is to calculate the PMCC of the ranks.
Worked example
Find Spearman's rank correlation coefficient for x: 3.2, 4.1, 2.8, 5.0, 4.6, 3.9 and y: 18, 21, 15, 20, 24, 17.
- Ranks of x: 2, 4, 1, 6, 5, 3
- Ranks of y: 3, 5, 1, 4, 6, 2
- Σd2 = 8
- r_s = 1 - 6 × 8/(6 × 35)
Answer: r_s = 0.7714
Check yourself
- Using the two judges' rankings, find Σd2.
Show answer
14. d = -1, 1, -1, 1, -1, -2, 2, 1; squares total 14.
- Using the two judges' rankings, find Spearman's rank correlation coefficient. Give your answer to 3 significant figures.
Show answer
0.833. 1 - 84/504 = 0.8333.
- For 10 pairs of ranks, Σd2 = 42. Find r_s. Give your answer to 3 significant figures.
Show answer
0.745. 1 - 252/990 = 0.7455.
- Find r_s for x: 3.2, 4.1, 2.8, 5.0, 4.6, 3.9 and y: 18, 21, 15, 20, 24, 17. Give your answer to 3 significant figures.
Show answer
0.771. Ranks give Σd2 = 8, so r_s = 1 - 48/210 = 0.7714.
- The values 12, 15, 15, 18 are ranked from smallest. What rank is given to each 15?
Show answer
2.5. The two 15s would occupy ranks 2 and 3, so each gets (2 + 3)/2 = 2.5.
- Five items are ranked by two judges in exactly opposite orders. Find Σd2.
Show answer
40. d = -4, -2, 0, 2, 4, so Σd2 = 16 + 4 + 0 + 4 + 16 = 40, giving r_s = 1 - 240/120 = -1.
- A scatter diagram shows y increasing with x but along a curve, not a straight line. Which coefficient is more suitable?
- The PMCC, because it uses the actual values
- The PMCC, because the data are not ranks
- Neither, because there is no correlation
- Spearman's rank, because the relationship is monotonic but not linear
Show answer
Spearman's rank, because the relationship is monotonic but not linear. Spearman's measures any always-increasing relationship; the PMCC only measures linear association.
- What does r_s = -1 tell you?
- There is no relationship between the rankings
- The rankings are identical
- The two rankings are in exactly the reverse order
- The data lie on a straight line with negative gradient
Show answer
The two rankings are in exactly the reverse order. Perfect disagreement: the highest on one is lowest on the other.
Sources
- Pearson Edexcel International Advanced Level in Mathematics specification (issue 3), Unit S3
- Pearson Edexcel IAL Statistics S3 (WST03) examiners' report, June 2025
- Pearson Edexcel IAL Statistics S3 (WST03) mark scheme, June 2024
- Pearson Edexcel Mathematical Formulae and Statistical Tables
Last updated 8 November 2026. Spotted a mistake? Tell us.