KS Maths
Topic 4.10 · AI SL and HL

Spearman's rank correlation coefficient

One point moves. Only one of the two numbers cares.

Spearman's rank correlation, when it beats Pearson, and what each of them is actually measuring.

Words you need (10 key words in this lesson)

The maths words this lesson uses, in plain English. Open this before you start if English is not your first language.

coefficient
The number multiplied by a letter in a term.In 7x, the coefficient is 7.
correlation
How strongly two sets of data are linked.Hours of study and test scores show positive correlation.
straight line
A line that does not bend.A ruler draws a straight line.
linear
Making a straight line. The letter has power 1.y = 2x plus 1 is linear.
outlier
A value far away from the rest of the data.One score of 100 among scores near 20 is an outlier.
write down
Give the answer with little or no working.Write down the median.
exact
Not rounded. Completely correct.The exact answer is one third, not 0.33.
variable
A letter that stands for a number that can change.In y = 2x, x and y are variables.
average
A typical value that stands for all the data.The average height is 150 cm.
justify
Give reasons that show your answer is correct.Justify your choice with a calculation.

Preview You are reading the start of this lesson. The rest opens with a plan. See plans Already paid? Sign in

Warm-up

Four quick ones from earlier work. Try each on paper before you open the answer; a slip here shows you what to watch for later in the lesson.

  1. Rank the values 12, 5, 9 and 20 from smallest (rank 1) to largest (rank 4).
    Answer

    5 is rank 1, 9 is rank 2, 12 is rank 3 and 20 is rank 4. So the ranks, in the order the values were given, are 3, 1, 2, 4. A rank is a position, so keep the original order when you write them down.

  2. What is the average of the ranks 3 and 4?
    Answer

    (3 + 4) ÷ 2 = 3.5. Two tied values share the average of the places they occupy, which is the step that makes tied ranks correct.

  3. Which correlation is stronger: r = −0.8 or r = 0.6?
    Answer

    r = −0.8. The strength is how far the number is from 0, and the sign only gives the direction. A negative value is not a weak one.

  4. The values of y are 2, 4, 8 and 16 as x goes 1, 2, 3, 4. Does y always rise? Does it rise by the same amount each step?
    Answer

    y always rises, but by 2, 4 and then 8, so the steps are not equal. The pattern always goes the same way but is not a straight line, which is called monotonic.

Words used in this lesson
rank
the position of a value when the data is put in order. For example: the smallest value has rank 1.
correlation
how closely two variables go up or down together. For example: taller people tend to have longer feet.
coefficient
a number that measures something, here the strength of correlation. For example: r is between −1 and 1.
monotonic
always going the same way, up or down, though not necessarily in a straight line. For example: the amount saved each month as the pay rises.
linear
following a straight line. For example: equal steps in x give equal steps in y.
outlier
a point far from the others. For example: one pupil who studied for a very long time.
tie
two or more values that are equal, so they share a rank. For example: two students with the same mark.
perfect
as strong as it can be, with the coefficient at −1 or 1. For example: a perfect match between two lists of ranks.
association
a link between two variables, not a proof that one causes the other. For example: ice cream sales and sunburn both rise in summer.
justify
give a reason based on the facts in the question. For example: justify using Spearman by naming the outlier.

Predict first. One point of a straight-line scatter is dragged a long way out to the right. Which coefficient do you expect to fall, the linear coefficient r, Spearman or both? Which falls further, and why? Decide before you drag.

Then check

Drag the point out in small steps and compare both readings at each step. Then switch to the curved relationship and compare again. Which reading depends on the actual values, and which only on the order?

Six points on a perfect straight line, so both coefficients start at 1. Drag the last point away and watch what happens to each.

drag the last point to the righty = x, with one stray51015201234567
1.0000Pearson r
1.0000Spearman rs
0.0000how far Pearson fell

Spearman only looks at the order. Moving a point further out does not change which one is biggest.

What each one measures

Pearson rSpearman rs
Usesthe actual valuesonly the ranks
Detectslinear association onlyany monotonic trend
Outliersvery sensitivebarely affected
r = 1 meansexactly on a straight linethe order matches perfectly

Monotonic means "always going the same way". It does not have to be straight. A curve that rises the whole time has Spearman exactly 1 and a Pearson below 1, which is the second demonstration above. A curve that falls the whole time is monotonic too.

The rest of this lesson is in the full course

Still to come in this lesson:

In the full lesson every figure moves as you drag it, and every answer you type is checked, with a note on what each wrong answer means.

IB Diploma plan: AI SL$99Every Diploma lesson in both courses and both levels, so a change of course never locks you out, and every lesson from Year 7 for the refreshers. $99 for 12 months or $149 for 2 years.

One plan opens every Diploma lesson, AA and AI, SL and HL, for the whole family.

One payment. Nothing renews. Full refund within 30 days. Prices are in US$; Gumroad shows your local currency at checkout. Pay by card on Gumroad, then come back here and type the email you paid with: we email you a sign-in link. For a refund, reply to your Gumroad receipt or email hello@ksmaths.com.

Try a free sample lesson in every unit, and the whole Skill Tree. See this unit.

Already have a revision pack or the Years 7 to 11 plan? Move up and the unused part of what you paid comes off.

Teaching students who need extra support? Student codes for 5, 10 or 30 students.

AI SL Mock Exam Pack, $19BuyPlan $99