DP Math AI · HL / SL · Statistics and Probability

SL 4.10—Spearman’s rank correlation coefficient

Get started
Notes

What Is Spearman's Rank Correlation Coefficient?

Spearman's Rank Correlation Coefficient: Denoted rs​, this is a non-parametric measure of the strength and direction of a monotonic relationship between two variables. It works by comparing the ranks of data values rather than the values themselves.

Because rs​ uses ranks rather than raw data, it makes no assumptions about the underlying frequency distribution of the variables. This makes it much more flexible than Pearson's correlation coefficient.

Monotonic Relationship: A relationship where, as one variable increases, the other variable either consistently increases (monotonically increasing) or consistently decreases (monotonically decreasing) , but not necessarily at a constant rate.

Analogy

Think of a monotonic relationship like climbing a hill , you might go fast, then slow, then fast again, but you're always moving upward. Pearson's requires a straight climb at a constant rate; Spearman's just needs a consistent direction.

The value of rs​ always lies between −1 and +1:

  • rs​=+1: perfect positive monotonic relationship
  • rs​=−1: perfect negative monotonic relationship
  • rs​=0: no monotonic relationship
  • Values close to ±1 indicate a strong relationship; values close to 0 indicate a weak relationship
Exam Tip

The absolute value ∣rs​∣ tells you the strength of the relationship; the sign tells you the direction. A value of rs​=−0.9 is just as strong as rs​=+0.9 , it just goes in the opposite direction.

The Formula for $r_s$

The Spearman's rank correlation coefficient is calculated using:

rs​=1−n(n2−1)6∑di2​​

Where:

  • di​ is the difference between the ranks of each corresponding pair of values
  • n is the number of pairs of data values
  • ∑di2​ means you square each difference and add them all up
Note

In the IB exam, you are expected to use technology (GDC or statistical software) to calculate rs​ rather than applying this formula by hand. However, understanding the formula helps you appreciate what the calculation is doing , comparing how similarly the two variables rank their data points.

The process, conceptually, is:

  1. Rank each dataset separately (1 = smallest, n = largest)
  2. Find the difference di​ between each pair of ranks
  3. Square each difference and sum them
  4. Substitute into the formula
Free preview

9 more sections in this topic

← Previous topicSL 4.9—Normal distributionNext topic →SL 4.11—Expected, observed, hypotheses, chi squared, gof, t-test
Koncepts

Learn it properly. Then practise like it's the real paper.

Start free

Features

  • Lessons
  • Past papers
  • Library
  • Homework Help
  • Duels

More

  • For parents
  • Compare
  • Plans & pricing
  • DP for students

Legal

  • Privacy
  • Terms
  • Account deletion

© 2026 Koncepts (product of PrepAiro, Inc). All rights reserved.
DP, IB, EE and TOK are terms of the International Baccalaureate Organization.

Made for IB DP students.