IB Mathematics: Applications and Interpretation · Topic 4 · Statistics and probability
4.10 Spearman's rank correlation
Calculate Spearman's rank correlation coefficient, interpret its value in context, and compare it with Pearson's coefficient.
1/5Spearman's coefficient measures whether two variables rise together
- Spearman's coefficient measures whether two variables rise together
- Ranking replaces each value with its position in order
- The coefficient compares the ranks of each pair
- A coefficient near either extreme shows a strong monotonic link
- Spearman suits curved or ranked data where Pearson does not
- Check your recall
- Practice: 10 questions
Part 1 of 5: Spearman's coefficient measures whether two variables rise together
Two judges each rank six songs from best to worst. We want to know how closely their rankings agree. Agreement means that a song ranked highly by one judge is ranked highly by the other.
This is a monotonic relationship, where one variable keeps moving in the same direction as the other increases. The Spearman's rank correlation coefficient, , measures how strong that relationship is. Its value lies between -1 and .
Suppose both judges give song C rank 1. They agree about that song. Many such agreements push towards , while many disagreements push it towards -1.
Key terms · tap one for its definition
monotonic relationship
A monotonic relationship is one in which one variable either never decreases or never increases as the other variable increases.
Spearman's rank correlation coefficient
Spearman's rank correlation coefficient is a value from -1 to measuring the strength and direction of a monotonic relationship.
Part 2 of 5: Ranking replaces each value with its position in order
Before calculating , convert each variable to ranks. A rank is the position of a value when the data are ordered. Use the same direction for both variables.
- Order the values of one variable from smallest to largest.
- Give rank 1 to the smallest value, rank 2 to the next, and so on.
- Repeat for the second variable, using the same direction.
Sometimes two values are equal. These tied values share the mean of the positions they would occupy. For scores 12, 15, 15, 20, the ranks are 1, 2.5, 2.5 and 4.
Key terms · tap one for its definition
rank
A rank is the position of a value in an ordered data set, with 1 given to the smallest or largest value.
tied values
Tied values are equal values in a data set, each given the mean of the rank positions they would occupy.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: A · Worked explanation
Part 3 of 5: The coefficient compares the ranks of each pair
Now find from the ranks. The simplest method is technology: calculate Pearson's coefficient for the ranks. Without ties, there is a shortcut formula using the rank differences .
Here is the difference between the two ranks of one pair. The number of pairs is .
The formula uses pairs of ranks. A small means the ranks are close, so is near . A large pushes towards -1.
Worked example
Maths and physics marks
- Rank the maths marks with 1 as the largest: 3, 4, 1, 5, 2.
- Rank the physics marks in the same way: 3, 5, 1, 4, 2.
- Find the differences : 0, -1, 0, 1, 0. Then .
- Substitute: .
Answer: .
Part 4 of 5: A coefficient near either extreme shows a strong monotonic link
Return to the five students, where . Students who rank highly in maths tend to rank highly in physics. The relationship is strong and positive.
- : the ranks agree perfectly, and one variable always increases with the other.
- : the ranks are exactly reversed, and one variable always decreases as the other increases.
- near 0: there is little or no monotonic association.
Values between these extremes show weaker links. Always state the direction and strength in the context of the data.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: A · Worked explanation
Part 5 of 5: Spearman suits curved or ranked data where Pearson does not
Pearson's coefficient measures how closely points follow a straight line, using the actual values. Spearman's coefficient uses only ranks. That makes it useful for a different set of cases.
Comparing the two coefficients
- Feature
- Data used
- Pearson's
- Actual values
- Spearman's
- Ranks of the values
- Feature
- Relationship measured
- Pearson's
- Linear
- Spearman's
- Monotonic
- Feature
- Effect of outliers
- Pearson's
- Can be large
- Spearman's
- Usually small
- Feature
- Suits ranked data
- Pearson's
- No
- Spearman's
- Yes
If the points rise along a curve, can equal 1 while is below 1. A scatter diagram helps you decide which coefficient to use.
Outliers matter less for Spearman's coefficient, because an extreme value only receives the highest rank. In Pearson's calculation the same value can dominate. Choose the coefficient that matches the pattern in the data.
Check your recall[14 marks]
6 written questions. Answer each one in your head or on paper, then open the mark scheme.
- 1.Describe[3 marks]
Describe how to rank a data set that contains tied values.
Show mark schemeHide mark scheme
Model answer
Order the values and assign positions 1, 2, 3 and so on. Identify the equal values. Give each of them the mean of the positions they would occupy.
- 1 mark for ordering the values and assigning positions
- 1 mark for identifying the tied values
- 1 mark for giving each tied value the mean of their positions
- 2.Calculate[2 marks]
Calculate for pairs of data with .
Show mark schemeHide mark scheme
Model answer
.
- 1 mark for substituting and into the formula
- 1 mark for obtaining 0.771
- 3.Describe[2 marks]
Describe what a value of shows about two variables.
Show mark schemeHide mark scheme
Model answer
There is a strong negative monotonic relationship. As one variable increases, the other tends to decrease.
- 1 mark for stating that the relationship is strong and negative
- 1 mark for stating that one variable tends to decrease as the other increases
- 4.State[1 mark]
State the smallest and largest possible values of .
Show mark schemeHide mark scheme
Model answer
The smallest value is -1 and the largest value is .
- 1 mark for stating -1 and
- 5.Distinguish[3 marks]
Distinguish between Pearson's coefficient and Spearman's coefficient.
Show mark schemeHide mark scheme
Model answer
Pearson's coefficient uses the actual values and measures linear relationships. Spearman's coefficient uses ranks and measures monotonic relationships. Spearman's coefficient is usually less affected by outliers.
- 1 mark for stating that Pearson's coefficient uses actual values for a linear relationship
- 1 mark for stating that Spearman's coefficient uses ranks for a monotonic relationship
- 1 mark for stating that Spearman's coefficient is less affected by outliers
- 6.Explain[3 marks]
Explain why data lying exactly on a rising curve can have but Pearson's below 1.
Show mark schemeHide mark scheme
Model answer
On a rising curve, each larger gives a larger , so the ranks agree exactly and . The points do not lie on a straight line. Pearson's coefficient measures linearity, so it is below 1.
- 1 mark for stating that the ranks agree exactly because the relationship always increases
- 1 mark for stating that the points do not lie on a straight line
- 1 mark for stating that Pearson's coefficient measures linear association

Practice this topic
10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)
0 right0 of 10 answered
Includes the 2 quick checks in the note above.
EasyIdentify[1 mark]
Show answer and explanation
Answer: A · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: A · Worked explanation
MediumIdentify[1 mark]
Show answer and explanation
Answer: A · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: A · Worked explanation
MediumIdentify[1 mark]
Show answer and explanation
Answer: A · Worked explanation
HardCalculate[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardIdentify[2 marks]
Show answer and explanation
Answer: A · Worked explanation