Regression and correlation
S3 Topic 5, spec point by spec point (Regression and correlation). Each spec point has the method, worked examples written the way the mark scheme wants them, how the marks go and the mistakes that cost the most marks.
Spec5.1Spearman's rank correlation coefficient
Spearman's rank correlation coefficient: its use, interpretation and limitations. Numerical questions with ties won't be set, but some understanding of how to deal with ties is expected.
The idea
Spearman's coefficient \(r_s\) measures how well the ranks of two variables agree. It is just the product moment correlation coefficient (PMCC) of the ranks, which simplifies to:
\[r_s = 1 - \frac{6\sum d^2}{n(n^2 - 1)}\]
where \(d\) is the difference in ranks for each item.
- \(r_s = 1\): the rankings agree perfectly. \(r_s = -1\): one is the reverse of the other. Near 0: no agreement.
- It measures monotonic association (as one goes up, the other tends to go up), not just linear.
Method
- Rank each variable separately (1 = largest, or 1 = smallest, but the same direction for both).
- Find \(d\) for each item, then \(\sum d^2\). (Check: \(\sum d = 0\).)
- Use the formula.
Spearman or PMCC?
| Use Spearman when | Use PMCC when |
|---|---|
| the data are ranks or ordinal (e.g. judges' placings) | the data are measurements |
| the relationship looks non-linear but monotonic | the relationship looks linear |
| the data don't look bivariate Normal | the data could be bivariate Normal (needed for the test) |
Ties: tied values get the mean of the ranks they would occupy (e.g. two equal 3rd places both get 3.5). The formula is then only approximate; strictly you'd find the PMCC of the ranks.
Limitation: ranking throws away information about how far apart the values are.
ranking raw data
Seven students' marks:
| Maths | 72 | 65 | 80 | 58 | 91 | 69 | 77 |
|---|---|---|---|---|---|---|---|
| Physics | 68 | 70 | 75 | 52 | 88 | 61 | 80 |
Ranks (1 = highest): maths 4, 6, 2, 7, 1, 5, 3; physics 5, 4, 3, 7, 1, 6, 2.
\(d = -1, 2, -1, 0, 0, -1, 1\), so \(\sum d^2 = 8\).
\(r_s = 1 - \frac{6 \times 8}{7 \times 48} = 1 - \frac17 = 0.857\).
- M1 for ranking at least one variable, M1 for \(d\) and \(\sum d^2\), dM1 for the formula with their \(\sum d^2\), A1 awrt the value (WST03A Jan 2026 Q1a).
- M1 for ranking, A1 both rankings correct, A1 \(\sum d^2\), dM1 formula, A1 (WST03 Oct 2020 Q3a).
Often asked as: very common (33 questions). Calculate \(r_s\); interpret; say why Spearman suits the data better than the PMCC; explain how ties are handled.
Ranking one variable from the largest and the other from the smallest.
Using \(n^2 - 1\) where \(n(n^2 - 1)\) is needed.
Spec5.2Testing whether a correlation is zero
Testing the hypothesis that a correlation is zero, using tables for Spearman's and the product moment correlation coefficients.
Method
- Hypotheses on the population coefficient \(\rho\):
- \(H_0: \rho = 0\)
- \(H_1: \rho > 0\) (positive correlation), \(\rho < 0\), or \(\rho \neq 0\) (two-tailed).
- Look up the critical value for \(n\) and the significance level in the right table (Spearman's or PMCC). For two tails, use half the level.
- If \(\lvert r \rvert\) is at least the critical value (in the direction of \(H_1\)), reject \(H_0\).
- Conclude in context.
Some Spearman critical values (one tail)
| \(n\) | 5% | 2.5% | 1% |
|---|---|---|---|
| 7 | 0.7143 | 0.7857 | 0.8929 |
| 8 | 0.6429 | 0.7381 | 0.8333 |
| 9 | 0.6000 | 0.7000 | 0.7833 |
(Always read from the formula booklet tables in the exam.)
Assumptions
- PMCC test: the data come from a bivariate Normal distribution.
- Spearman test: no distribution assumption; the data just need to be rankable.
Spearman test
Using \(r_s = 0.857\) from 5.1 (\(n = 7\)), test at 5% for positive correlation between maths and physics marks.
\(H_0: \rho = 0\), \(H_1: \rho > 0\). Critical value 0.7143.
\(0.857 > 0.7143\): reject \(H_0\). There is evidence of a positive correlation between maths and physics marks.
PMCC test
For 10 pairs, \(r = 0.62\). Test at 5% for positive correlation.
PMCC critical value (\(n = 10\), 5% one tail) is 0.5494. \(0.62 > 0.5494\): reject \(H_0\); there is evidence of positive correlation.
- B1 for \(H_0: \rho = 0\), \(H_1: \rho > 0\) (attached to \(\rho\)), B1 for the critical value 0.6429, M1 correct comparison, A1ft conclusion in context (WST03A Jan 2026 Q1b).
- Not reaching the critical value: "do not reject \(H_0\); there is no evidence of positive correlation" (WST03 Jan 2023 Q2b).
- Assumption for a PMCC test: bivariate Normal (WST03 Jan 2022 Q3c).
Often asked as: a test straight after calculating \(r_s\); a choice of which coefficient (and table) to use.
Using the PMCC table for a Spearman coefficient, or the other way round.
Hypotheses about \(r_s\) instead of \(\rho\).