Spearman's Rank Correlation Coefficient, Including Tied Ranks | Applications and Interpretation IB Maths notes

Free preview: Spearman's Rank Correlation Coefficient, Including Tied Ranks

Correlation Using Ranks

Applications and interpretation: SL and HL (SL 4.10)

Let's start with two judges at a baking contest. They don't give marks, only an order: 1st, 2nd, 3rd... How well do they agree? Pearson's r (the PMCC) needs measurements, but here we only have ranks (positions in an order).

  • Spearman's rank correlation coefficient rs is the PMCC of the ranks.
  • It measures how well the relationship is described by a monotonic function: as one goes up, the other always goes up (or always down), not necessarily in a straight line.
  • Like r, it lies between โˆ’1 and 1. rs=1 means the two orders match exactly; rs=−1 means one order is the exact reverse of the other.

rs=1−6∑d2n(n2−1)

  • d is the difference between the two ranks for each item; n is the number of items.
  • This short formula gives exactly the PMCC of the ranks when there are no ties.

In the IB you find rs with your GDC, so you never need this formula. It is shown here because it explains why close rankings give a value near 1.

๐Ÿ“ On your GDC: Spearman's rs

  1. Rank each variable separately by hand (1 for the smallest), averaging any tied ranks.
  2. Enter the ranks of x in list 1 and the ranks of y in list 2. Enter ranks, not the raw data.
  3. Run your GDC's linear regression (or correlation) tool on the two lists of ranks.
  4. The r on the screen is rs. Write it to 3 s.f.
  5. For the cakes: the ranks give r = 0.83333..., so rs=0.833 (3 s.f.).

Where the 6 comes from (no ties)

  1. Both sets of ranks are 1, 2, ..., n, so they have the same mean and the same Sxx=Syy=n(n2−1)12.
  2. ∑d2=∑(x−y)2=Sxx+Syy−2Sxy=2Sxx−2Sxy (the means cancel).
  3. So Sxy=Sxx−12∑d2, and r=SxySxx=1−∑d22Sxx=1−6∑d2n(n2−1).

๐Ÿ’ก In plain words

  • Small differences between ranks mean small ∑d2 and rs close to 1.
  • With the GDC you never add up the dยฒ, but the idea is the same: the closer the two orders, the closer rs is to 1.

Method: Spearman's coefficient

  1. Rank each variable separately, in the same direction.
  2. d = rank of x โˆ’ rank of y for each item; check ∑d=0.
  3. Square and add for ∑d2.
  4. Substitute into the formula, and interpret.

๐Ÿ‘€ Watch me do it: five people's hours of sleep x and reaction times y (seconds): (6.5, 0.42), (8, 0.31), (7, 0.35), (5, 0.48), (9, 0.33). Find rs

What I writeWhy I do it
Rank x (1 = smallest): 2, 4, 3, 1, 5Step 1: 5 is the smallest sleep, so it gets rank 1.
Rank y (1 = smallest): 4, 1, 3, 5, 2Same direction for y: 0.31 is the smallest time.
d = rank x โˆ’ rank y: โˆ’2, 3, 0, โˆ’4, 3Step 2. Check: โˆ’2 + 3 + 0 โˆ’ 4 + 3 = 0 โœ“.
∑d2=4+9+0+16+9=38Step 3.
rs=1−6×385×24=1−228120=−0.9Step 4: n = 5, so n2−1=24.
Strong negative association: more sleep goes with quicker reactionsInterpret the sign and size in context.

โœ๏ธ YOUR TURN 1

Try this first:

Six students' maths and physics marks: (72, 65), (55, 58), (81, 77), (64, 70), (90, 85), (48, 52). Find rs.

Answer:

  • Maths ranks (1 = lowest): 4, 2, 5, 3, 6, 1. Physics ranks: 3, 2, 5, 4, 6, 1.
  • d: 1, 0, 0, โˆ’1, 0, 0. ∑d=0 โœ“, ∑d2=2.
  • rs=1−6×26×35=1−12210=0.943 (3 s.f.): strong agreement.

Unlock the full note: start 7 days free.

Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.

Log in ยท Subscribe ยท Start free trial

All notes in Correlation and regression (SL 4.4, 4.10; AHL 4.13)

  1. Scatter Diagrams, Correlation and Regression Lines
  2. Spearman's Rank Correlation Coefficient, Including Tied Ranks
  3. Pearson's Correlation Coefficient r: Meaning and GDC Method
  4. Residuals and the Residual Sum of Squares
  5. Least Squares Regression Lines on the GDC: y on x and x on y
  6. Non-Linear Regression and the Coefficient of Determination

What's inside for this topic

6 teacher notes, 69 practice questions, 40 flashcards, 2 quizzes.

Get the full notes, every practice question, flashcards, quizzes and mock papers.

Start your free 7-day trial

Questions? Chat with us on WhatsApp ยท Try one live lesson

Previous note: Scatter Diagrams, Correlation and Regression Lines Next note: Pearson's Correlation Coefficient r: Meaning and GDC Method

All Applications and Interpretation IB Maths topics ยท IB Maths