Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›IB Mathematics: Applications and Interpretation
  3. ›4 Statistics and probability
  4. ›4.10 Spearman's rank correlation

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.

  • 4 min read
  • 5 parts
  • 10 questions
  • Draft
Start a Quick 5 on this topic→Jump to the 10 questions
1/5Spearman's coefficient measures whether two variables rise together
  1. 1Spearman's coefficient measures whether two variables rise together
  2. 2Ranking replaces each value with its position in order
  3. 3The coefficient compares the ranks of each pair
  4. 4A coefficient near either extreme shows a strong monotonic link
  5. 5Spearman suits curved or ranked data where Pearson does not
  6. Check your recall
  7. Practice: 10 questions
1

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, rsr_srs​, measures how strong that relationship is. Its value lies between -1 and +1+1+1.

Suppose both judges give song C rank 1. They agree about that song. Many such agreements push rsr_srs​ towards +1+1+1, 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 rsr_srs​ is a value from -1 to +1+1+1 measuring the strength and direction of a monotonic relationship.

Part 1 done

2

Part 2 of 5: Ranking replaces each value with its position in order

Before calculating rsr_srs​, 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.

Part 2 done

Quick check

One question on the part you just read

Easy

State the range of possible values of Spearman's rank correlation coefficient rsr_srs​.
Show answer and explanation

Answer: A · Worked explanation

Spearman's coefficient is a correlation measure, so it lies from -1 to +1+1+1. A range from 0 to 1 would exclude negative relationships. Values beyond ±1\pm 1±1 are impossible.
3

Part 3 of 5: The coefficient compares the ranks of each pair

Now find rsr_srs​ 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 ddd.

Here ddd is the difference between the two ranks of one pair. The number of pairs is nnn. rs=1−6∑d2n(n2−1)r_s=1-\frac{6\sum d^2}{n(n^2-1)}rs​=1−n(n2−1)6∑d2​

The formula uses nnn pairs of ranks. A small ∑d2\sum d^2∑d2 means the ranks are close, so rsr_srs​ is near +1+1+1. A large ∑d2\sum d^2∑d2 pushes rsr_srs​ towards -1.

Worked example

Maths and physics marks

Five students have maths marks 72, 65, 90, 58, 81 and physics marks 68, 60, 85, 62, 70, in the same student order. Calculate rsr_srs​.
  1. 1
    Rank the maths marks with 1 as the largest: 3, 4, 1, 5, 2.
  2. 2
    Rank the physics marks in the same way: 3, 5, 1, 4, 2.
  3. 3
    Find the differences ddd: 0, -1, 0, 1, 0. Then ∑d2=2\sum d^2=2∑d2=2.
  4. 4
    Substitute: rs=1−6×25×24=1−0.1r_s=1-\frac{6\times 2}{5\times 24}=1-0.1rs​=1−5×246×2​=1−0.1.

Answer: rs=0.9r_s=0.9rs​=0.9.

Exam tip

Rank both variables in the same direction. Ranking one from largest and the other from smallest reverses the sign of rsr_srs​.

Part 3 done

4

Part 4 of 5: A coefficient near either extreme shows a strong monotonic link

Return to the five students, where rs=0.9r_s=0.9rs​=0.9. Students who rank highly in maths tend to rank highly in physics. The relationship is strong and positive.

  • rs=+1r_s=+1rs​=+1: the ranks agree perfectly, and one variable always increases with the other.
  • rs=−1r_s=-1rs​=−1: the ranks are exactly reversed, and one variable always decreases as the other increases.
  • rsr_srs​ 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.

Common mistake

A high rsr_srs​ does not prove that one variable causes the other. It shows only that the two tend to move together.

Part 4 done

Quick check

One question on the part you just read

Easy

The values 7, 9, 9, 12 are ranked from smallest to largest. Determine the ranks.
Show answer and explanation

Answer: A · Worked explanation

The two values of 9 occupy positions 2 and 3, so each gets the mean, 2.5. Giving both rank 2 ignores the shared positions. Ranks 1, 2, 3, 4 would treat the equal values as different.
5

Part 5 of 5: Spearman suits curved or ranked data where Pearson does not

Pearson's coefficient rrr 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.

Figure 1. The points always rise, so their ranks agree perfectly and rs=1r_s=1rs​=1. The relationship is monotonic but not linear.

Comparing the two coefficients

FeaturePearson's rrrSpearman's rsr_srs​
Data usedActual valuesRanks of the values
Relationship measuredLinearMonotonic
Effect of outliersCan be largeUsually small
Suits ranked dataNoYes
Feature
Data used
Pearson's rrr
Actual values
Spearman's rsr_srs​
Ranks of the values
Feature
Relationship measured
Pearson's rrr
Linear
Spearman's rsr_srs​
Monotonic
Feature
Effect of outliers
Pearson's rrr
Can be large
Spearman's rsr_srs​
Usually small
Feature
Suits ranked data
Pearson's rrr
No
Spearman's rsr_srs​
Yes

If the points rise along a curve, rsr_srs​ can equal 1 while rrr 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.

Note read

Check your recall[14 marks]

6 written questions. Answer each one in your head or on paper, then open the mark scheme.

  1. 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. 2.Calculate[2 marks]

    Calculate rsr_srs​ for n=6n=6n=6 pairs of data with ∑d2=8\sum d^2=8∑d2=8.

    Show mark schemeHide mark scheme

    Model answer

    rs=1−6×86×35=1−48210=0.771r_s=1-\frac{6\times 8}{6\times 35}=1-\frac{48}{210}=0.771rs​=1−6×356×8​=1−21048​=0.771.

    • 1 mark for substituting n=6n=6n=6 and ∑d2=8\sum d^2=8∑d2=8 into the formula
    • 1 mark for obtaining 0.771
  3. 3.Describe[2 marks]

    Describe what a value of rs=−0.85r_s=-0.85rs​=−0.85 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. 4.State[1 mark]

    State the smallest and largest possible values of rsr_srs​.

    Show mark schemeHide mark scheme

    Model answer

    The smallest value is -1 and the largest value is +1+1+1.

    • 1 mark for stating -1 and +1+1+1
  5. 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. 6.Explain[3 marks]

    Explain why data lying exactly on a rising curve can have rs=1r_s=1rs​=1 but Pearson's rrr below 1.

    Show mark schemeHide mark scheme

    Model answer

    On a rising curve, each larger xxx gives a larger yyy, so the ranks agree exactly and rs=1r_s=1rs​=1. 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.

3.

Easy·Identify[1 mark]

Identify what rs=+1r_s=+1rs​=+1 shows about two variables.
Show answer and explanation

Answer: A · Worked explanation

A value of +1+1+1 means the ranks agree perfectly, so one variable always increases with the other. The relationship need not be a straight line. Even a perfect value does not prove causation.
4.

Medium·Calculate[2 marks]

Calculate rsr_srs​ for n=8n=8n=8 pairs with ∑d2=42\sum d^2=42∑d2=42.
Show answer and explanation

Answer: A · Worked explanation

rs=1−6×428×63=1−252504=0.5r_s=1-\frac{6\times 42}{8\times 63}=1-\frac{252}{504}=0.5rs​=1−8×636×42​=1−504252​=0.5. The value 0.917 comes from leaving out the factor of 6. The value -0.5 has the wrong sign.
5.

Medium·Identify[1 mark]

A study finds rs=−0.82r_s=-0.82rs​=−0.82 between hours of screen time and sleep time. Identify the best interpretation.
Show answer and explanation

Answer: A · Worked explanation

A value of -0.82 is strong and negative, so ranks tend to move in opposite directions. Correlation alone does not show cause. The coefficient is not a rate of change in hours.
6.

Medium·Calculate[2 marks]

Calculate rsr_srs​ for n=10n=10n=10 pairs with ∑d2=30\sum d^2=30∑d2=30.
Show answer and explanation

Answer: A · Worked explanation

rs=1−6×3010×99=1−180990=0.818r_s=1-\frac{6\times 30}{10\times 99}=1-\frac{180}{990}=0.818rs​=1−10×996×30​=1−990180​=0.818. The value 0.182 is the fraction 180990\frac{180}{990}990180​ itself and forgets to subtract it from 1. The value 0.970 would need ∑d2=5\sum d^2=5∑d2=5.
7.

Medium·Identify[1 mark]

Identify the data for which Spearman's coefficient is more suitable than Pearson's.
Show answer and explanation

Answer: A · Worked explanation

Spearman's coefficient detects monotonic patterns, including curves. For a clear straight line, Pearson's coefficient works well. A single variable has no second variable to correlate with.
8.

Hard·Calculate[2 marks]

Five pairs have xxx ranks 2, 5, 1, 4, 3 and yyy ranks 3, 5, 1, 2, 4. Calculate rsr_srs​.
Show answer and explanation

Answer: A · Worked explanation

The differences are -1, 0, 0, 2, -1, so ∑d2=6\sum d^2=6∑d2=6. Then rs=1−36120=0.7r_s=1-\frac{36}{120}=0.7rs​=1−12036​=0.7. The value 0.3 is 36120\frac{36}{120}12036​ before subtracting from 1. The value 0.95 leaves out the factor of 6.
9.

Hard·Determine[2 marks]

Data lie exactly on y=x3y=x^3y=x3 for x=1,2,3,4,5x=1,2,3,4,5x=1,2,3,4,5. Determine rsr_srs​.
Show answer and explanation

Answer: A · Worked explanation

Every larger xxx gives a larger yyy, so the ranks agree exactly and rs=1r_s=1rs​=1. The value 0.94 is about what Pearson's coefficient gives for the raw values. Zero would mean no monotonic association, which is false here.
10.

Hard·Identify[2 marks]

Data follow a clear U-shaped curve and give rs≈0.02r_s\approx 0.02rs​≈0.02. Identify the conclusion that is justified.
Show answer and explanation

Answer: A · Worked explanation

A U shape falls and then rises, so it is not monotonic and rsr_srs​ is near 0. The variables are still strongly related. A value near zero rules out only a monotonic link.

Keep going

Next topic4.11 Chi-squared and t-testsPrevious topic4.9 Normal distribution

More in Topic 4 · Statistics and probability

  1. 4.6Combined events and diagramsNotes · 10 questions
  2. 4.7Discrete random variablesNotes · 10 questions
  3. 4.8Binomial distributionNotes · 10 questions
  4. 4.9Normal distributionNotes · 10 questions
  5. 4.10Spearman's rank correlationNotes · 10 questions
  6. 4.11Chi-squared and t-testsNotes · 10 questions
  7. 4.12Designing data collectionNotes · 10 questions· HL only
  8. 4.13Non-linear regressionNotes · 10 questions· HL only
  9. 4.14Linear combinations of random variablesNotes · 10 questions· HL only

All IB Mathematics: Applications and Interpretation topics →

Draft: written by Scribe and checked automatically, not yet by a subject reviewer.

Practice questions are original, written by Scribe and checked automatically for correctness.

Topic codes follow the official numbering. Not endorsed by IB Diploma Programme or any exam board.

On this page

0/5 read

  1. 1Spearman's coefficient measures whether two variables rise together
  2. 2Ranking replaces each value with its position in order
  3. 3The coefficient compares the ranks of each pair
  4. 4A coefficient near either extreme shows a strong monotonic link
  5. 5Spearman suits curved or ranked data where Pearson does not
  6. Check your recall
  7. Practice: 10 questions
All coursesScribeHow it worksPricingPrivacyTerms

Notes and questions are written by Scribe in our own words. Topic codes follow the official course numbering so you can find your place. Not produced or endorsed by the IB, College Board, AQA, OCR, Pearson Edexcel or any exam board.

© 2026 Scribe

Rising but not straight

Variable y012340204060Variable x
  • Monotonic curve