All revision notes topics

Spearman's rank correlation coefficientEdexcel International A Level Further Maths: Revision notes

Section 1

What it measures and when to use it

Spearman's rank correlation coefficient, rsr_s, measures how well the ranks of one variable agree with the ranks of another. It takes values from −1-1 to +1+1. rs=+1r_s=+1: the two rankings are identical. rs=−1r_s=-1: one ranking is the exact reverse of the other. rsr_s near 0: no consistent agreement. Use it when the data are already ranks (for example two judges), or when the relationship is monotonic (always increasing or always decreasing) but not necessarily linear, or when the data are not from a bivariate Normal distribution.

Key termsSpearman's rank correlation coefficientrankmonotonic
Exam tip

Spearman's coefficient is the product moment correlation coefficient of the ranks, so it is not changed by any increasing transformation of the data.

Section 2

Ranking the data

Rank each variable separately, using the same direction for both (rank 1 for the largest in both, or rank 1 for the smallest in both). The direction can be chosen freely, as long as it is the same for both variables. Ties: if two or more values are equal, give each the mean of the ranks they would have occupied. For example, values in 4th and 5th place that are equal each get rank 4.54.5, and the next value is ranked 6th. Questions with numerical ties will not be set, but you should know this rule and be able to state the ranks.

Key termstied ranks
Common mistake

Ranking one variable from highest to lowest and the other from lowest to highest. This reverses the sign of rsr_s.

Section 3

Calculating rsr_s

Find the difference d=rankx−rankyd=\text{rank}_x-\text{rank}_y for each pair and then ∑d2\sum d^2: rs=1−6∑d2n(n2−1),r_s=1-\frac{6\sum d^2}{n(n^2-1)}, where nn is the number of pairs. Worked example: six dancers are ranked by two judges with d=−2,1,1,−1,−1,0d=-2,1,1,-1,-1,0. ∑d2=8\sum d^2=8 and rs=1−6×86×35=1−48210=0.771r_s=1-\frac{6\times8}{6\times35}=1-\frac{48}{210}=0.771. Check: ∑d\sum d must be 0, and ∑d2\sum d^2 is always an even number when there are no ties.

Key termsdifference in ranks
Common mistake

Using ∑∣d∣\sum|d| or forgetting to square dd, and forgetting to subtract 6∑d2n(n2−1)\frac{6\sum d^2}{n(n^2-1)} from 1.

Section 4

Interpreting rsr_s

Always interpret in context. rsr_s close to +1+1: strong positive correlation between the ranks, so items ranked high on one tend to be ranked high on the other. Close to −1-1: strong negative correlation, so high on one means low on the other. Close to 0: little or no agreement. Reversing one of the rankings changes the sign of rsr_s but not its size. Correlation is not causation: a strong rsr_s does not show that one variable causes the other, as a third variable may affect both. Size of nn matters too: with few pairs a large rsr_s can occur by chance (a test for this is the next step in the unit).

Key termspositive correlationnegative correlationcausation
Common mistake

Saying 'the judges agree exactly' for rs=0.77r_s=0.77. Say 'strong positive correlation: broad agreement'.

Section 5

Limitations of Spearman's coefficient

It uses only the order of the values, so it ignores how far apart they are and loses information. A very large change in one value can have the same effect as a small one. It measures only the strength of a monotonic relationship. A relationship that rises then falls can give rsr_s near 0 even though the variables are strongly related. It does not show cause. With small nn the value is unreliable. Advantage over the product moment correlation coefficient: it is less affected by outliers and needs no assumption of a bivariate Normal distribution.

Key termsoutlierlimitation
Exam tip

In evaluate questions give a reason, a limitation and the causation point. Each is worth a mark.

That's the notes covered.

Carry on to the next subtopic.

Exam questions on Spearman's rank correlation coefficient

  1. Two judges, X and Y, each rank six dancers A to F, with rank 1 for the best. Judge X ranks them A, B, C, D, E, F in that order, so A is 1st and F is 6th. Judge Y gives A rank 3, B rank 1, C rank 2, D rank 5, E rank 4 and F rank 6.
    Interpret the value of the coefficient for the two judges.2 marks
  2. A teacher ranks eight students A to H from the highest mark (rank 1) to the lowest in maths, and again in physics. The maths ranks of A to H are 1 to 8 respectively. The physics ranks of A to H are 3, 1, 2, 5, 4, 8, 6 and 7 respectively.
    A second teacher gives the physics ranks with rank 1 for the lowest mark instead of the highest, and leaves the maths ranks unchanged. State the new value of the coefficient, with a reason.2 marks
  3. A café owner compares seven coffee blends A to G. The prices per kilogram, in pounds, are A 12, B 18, C 15, D 22, E 9, F 25 and G 20. The customer rating scores out of 10 are A 6.1, B 7.0, C 5.8, D 8.2, E 4.9, F 7.9 and G 7.4.
    Rank the blends by price and by rating, and calculate Spearman's rank correlation coefficient.3 marks
See the full worksheet

Written by the Exaim team, led by Shaun Daswani (Head of Upper Secondary, Improve ME Institute; MSc Financial Mathematics, Imperial College London; BSc, UCL) and Jason Daswani (operational lead, Improve ME Institute; LSE).