Revision Library
Choose a subject
Menu
GCSE Statistics · Topic guide

Spearman's Rank Correlation

Spearman's rank correlation coefficient measures the strength and direction of a relationship between two ranked variables, giving a value between -1 (perfect negative) and +1 (perfect positive). In GCSE Statistics it is calculated using rs = 1 - (6 x sum of d^2) / (n(n^2 - 1)), where d is the difference between each pair of ranks and n is the number of pairs.

HigherCorrelation and Time SeriesEdexcelAQACCEA

Before you start

Make sure you're comfortable with these topics first:

Method

  1. Rank each set of data separately, giving equal (averaged) ranks to any tied values.
  2. Find the difference, d, between the two ranks for each pair of data.
  3. Square each difference to get d^2, then find the sum of all the d^2 values.
  4. Substitute the sum of d^2 and the number of pairs, n, into the formula rs = 1 - (6 x sum of d^2) / (n(n^2 - 1)).
  5. Calculate rs, giving the answer as a decimal, usually to 2 or 3 decimal places, between -1 and 1.
  6. Interpret the value: close to +1 means strong positive correlation between the rankings, close to -1 means strong negative correlation, and close to 0 means little or no correlation.

Common mistakes

  • MistakeUsing the largest rank as n instead of counting the number of paired observations in the data.

    InsteadCount the pairs and use that total for n. The formula's n is the number of observations being compared, not a rank value chosen from the table.

  • MistakeAdding the rank differences without squaring them, so positive and negative differences cancel out.

    InsteadMake a separate d squared column and square every difference before adding. The formula requires the sum of d^2, not the sum of d.

  • MistakeRounding the sum of squared differences or an intermediate fraction before substituting into the Spearman formula.

    InsteadKeep the differences, squares and fraction exact in the working, then round rs only at the precision requested in the question.

Worked examples

Example 1

Five students' scores in a maths test and a science test are ranked below. Maths rank: 1, 2, 3, 4, 5. Science rank: 2, 1, 3, 5, 4. Calculate Spearman's rank correlation coefficient.

  1. Find d for each pair: 1-2=-1, 2-1=1, 3-3=0, 4-5=-1, 5-4=1.
  2. Square each difference: 1, 1, 0, 1, 1.
  3. Sum the squared differences: sum d^2 = 1+1+0+1+1 = 4.
  4. Substitute into the formula with n = 5: rs = 1 - (6 x 4) / (5(25-1)) = 1 - 24/120.
  5. Simplify: rs = 1 - 0.2 = 0.8.
  6. Final answer: rs = 0.8, showing a strong positive correlation between the two sets of ranks.

Example 2

Nine films are ranked by two review panels. Panel 1 gives ranks 1, 2, 3, 4, 5, 6, 7, 8, 9. Panel 2 gives ranks 3, 1, 4, 2, 6, 9, 8, 5, 7 in the same film order. Calculate Spearman's rank correlation coefficient to 2 decimal places and interpret it.

  1. Find the rank differences d: -2, 1, -1, 2, -1, -3, -1, 3, 2.
  2. Square them: 4, 1, 1, 4, 1, 9, 1, 9, 4, giving sum d^2 = 34.
  3. Substitute n = 9 into rs = 1 - (6 x sum d^2) / (n(n^2 - 1)): rs = 1 - (6 x 34) / (9(81 - 1)).
  4. Evaluate the formula: rs = 1 - 204 / 720 = 0.716666... .
  5. Final answer: rs = 0.72 to 2 d.p., showing a fairly strong positive correlation between the two panels' rankings.

Practice questions

Q1[1 mark]Two judges rank 4 dogs in a competition. Judge A's ranks: 1, 2, 3, 4. Judge B's ranks: 1, 2, 3, 4. Find the sum of d^2.Show answer

Answer: 0 (every difference is 0).

Got it right?
Q2[2 marks]Using the data in the previous question, find Spearman's rank correlation coefficient.Show answer

Answer: rs = 1 (perfect agreement, since sum of d^2 = 0).

Got it right?
Q3[1 mark]Two rankings of 5 items give differences d: 1, -1, 2, -2, 0. Find the sum of d^2.Show answer

Answer: 10 (1+1+4+4+0).

Got it right?
Q4[2 marks]Using n = 5 and sum of d^2 = 10, calculate Spearman's rank correlation coefficient.Show answer

Answer: rs = 0.5 (1 - (6x10)/(5x24) = 1 - 60/120).

Got it right?
Q5[2 marks]A calculation gives Spearman's rank correlation coefficient of -0.9. Describe what this shows about the relationship between the two rankings.Show answer

Answer: A strong negative correlation: as one ranking increases, the other tends to decrease.

Got it right?
Your answerWork it out on paper, then show the answer and mark yourself.
Q6[2 marks]Six pairs of ranks give sum of d^2 = 14. Calculate Spearman's rank correlation coefficient, giving your answer to 2 decimal places.Show answer

Answer: 0.60 (1 - (6x14)/(6x35) = 1 - 84/210 = 1 - 0.4).

Got it right?

Exam-style questions

Written in the style of a GCSE Statistics exam paper, with a full mark scheme.

Exam tips

  • Make columns for the two ranks, d and d^2, then count the pairs before substituting into the formula.
  • Square negative differences as well as positive ones, and keep the sum of d^2 exact until the final calculation.
  • Check that the final coefficient lies between -1 and 1, then interpret its sign and its distance from zero in context.
Q1[3 marks]Two examiners rank 5 essays. Their rankings differ by d = 0, 1, -1, 2, -2 for the five essays. Calculate Spearman's rank correlation coefficient.Show mark scheme

Tick each line you got.

Nothing ticked yet - 3 available

Got it right?
Q2[4 marks]The table shows the ranks given by two panels to 6 films. Panel 1 ranks: 1, 2, 3, 4, 5, 6. Panel 2 ranks: 2, 1, 4, 3, 6, 5. (a) Find the value of sum of d^2. (b) Calculate Spearman's rank correlation coefficient, giving your answer to 2 decimal places.Show mark scheme

Tick each line you got.

Nothing ticked yet - 4 available

Got it right?
Q3[5 marks]Eight athletes are ranked by two different coaches based on performance. The sum of the squared rank differences is sum d^2 = 20. (a) Calculate Spearman's rank correlation coefficient, giving your answer to 2 decimal places. (b) Interpret your value in the context of the two coaches' rankings.Show mark scheme

Tick each line you got.

Nothing ticked yet - 5 available

Got it right?

See real GCSE Statistics past-paper questions, with official mark schemes 

This topic in real past papers

We have tagged some boards' past papers question by question (not every board or year yet). This topic comes up in:

Free printable worksheet

Want more practice on paper? Download the Spearman's Rank Correlation worksheet pack - 26 pages of exam-style questions with a full mark scheme. Free to download, no card or account. Print it for personal and classroom use.

This topic is chapter 12 of GCSE Statistics Higher Essentials 2, the whole course as one free printable PDF. Its worksheet is also chapter 4 of GCSE Statistics Higher Topic Workbook 6 and chapter 1 of GCSE Statistics Higher 10-Minute Tests 3, free printable practice books.

Other versions of this worksheet:

Keep going

Not quite what you needed?

Tell us what is missing on Spearman's Rank Correlation, or which topic to write up next.

Build a full practice pack.