jmaths
IB Mathematics: Applications and Interpretation SL · 13.3: Statistics · 13.3.8
Spearman's rank correlation and comparison with Pearson's r Problem set A Worked solutions
Skills
-
Calculate Spearman's rank correlation coefficient for the data. x: 5, 9, 2, 14, 7, 11, 4, 16 y: 18, 25, 12, 20, 22, 31, 15, 27
- Ranks of x (smallest = 1): 3, 5, 1, 7, 4, 6, 2, 8
- Ranks of y: 3, 6, 1, 4, 5, 8, 2, 7
- From the calculator, correlation of the ranks: \(r_s = 0.810\)
-
Calculate Spearman's rank correlation coefficient for the data. x: 2.4, 7.1, 5.3, 9.8, 3.6, 6.2, 8.4 y: 12.1, 9.6, 15.2, 7.9, 14.3, 4.8, 10.4
- Ranks of x (smallest = 1): 1, 5, 3, 7, 2, 4, 6
- Ranks of y: 5, 3, 7, 2, 6, 1, 4
- From the calculator, correlation of the ranks: \(r_s = −0.607\)
-
Calculate Spearman's rank correlation coefficient for the data. x: −8, −3, 5, −6, 2, 9, −1, 0 y: 14, −4, −10, 9, −2, −15, 3, 6
- Ranks of x (smallest = 1): 1, 3, 7, 2, 6, 8, 4, 5
- Ranks of y: 8, 3, 2, 7, 4, 1, 5, 6
- From the calculator, correlation of the ranks: \(r_s = −0.833\)
-
Calculate Spearman's rank correlation coefficient for the data. x: 3.5, 5.2, 3.5, 7.8, 5.2, 6.1, 3.5 y: 9, 4, 7, 4, 2, 6, 7
- Ranks of x (smallest = 1): 2, 4.5, 2, 7, 4.5, 6, 2
- Ranks of y: 7, 2.5, 5.5, 2.5, 1, 4, 5.5
- From the calculator, correlation of the ranks: \(r_s = −0.715\)
-
The scatter graph shows the data. Which pair of values fits the graph? A: r = 1, r_s = 1 B: r = 0.90, r_s = 1 C: r = 0.50, r_s = 0.70
- The points always rise as x rises, so every increase in x goes with an increase in y: \(r_s = 1\).
- The points lie on a curve, not a straight line, so \(r\) is not \(\pm 1\).
- From the calculator: \(r = 0.90\). The pair is B.
In context
-
A letting agency lists eight flats. The table gives the distance from the city centre (km) and the monthly rent ($). x (km): 1.2, 3.5, 0.8, 5.1, 2.4, 6.3, 3.5, 4.2 y ($): 1450, 1100, 1580, 820, 1250, 760, 1020, 930
(a) Write down the ranks of the distance data.
- The value 3.5 appears twice, so the two ranks are averaged.
- Ranks: 2, 4.5, 1, 7, 3, 8, 4.5, 6
(b) Calculate \(r_s\).
- Ranks of monthly rent: 7, 5, 8, 2, 6, 1, 4, 3
- From the calculator, correlation of the ranks: \(r_s = −0.994\)
(c) Describe the association in context.
- \(r_s = −0.994\): a strong negative association. As distance increases, monthly rent tends to decrease. This does not show that one causes the other.
-
A sample of a radioactive substance is weighed over 14 days. x is the time in days and y the mass remaining in grams. x: 0, 2, 4, 6, 8, 10, 12, 14 y: 80, 52, 35, 24, 15, 11, 7, 5
(a) Sketch a scatter graph of y against x.
- Plot the eight points: The points fall from left to right along a curve that flattens out.
(b) Use your graph to explain why Spearman's rank correlation is more appropriate than Pearson's to measure the association.
- The points always fall as x increases but lie on a curve, not near a straight line.
- Pearson's r only measures how close the points are to a straight line.
(c) Calculate \(r_s\) and Pearson's \(r\), and comment on them.
- Ranks of x: 1, 2, 3, 4, 5, 6, 7, 8
- Ranks of y: 8, 7, 6, 5, 4, 3, 2, 1
- From the calculator: \(r_s = −1\)
- From the calculator, raw data: \(r = −0.928\)
- \(r_s\) shows a perfect monotonic relationship; \(r\) is weaker because the points are curved.
-
A kiosk records the hours of sunshine each day and the number of ice creams sold. x: 4.5, 6.2, 7, 3.8, 8.1, 5.5, 6.8, 2.9 y: 120, 165, 150, 110, 190, 142, 171, 95
(a) Calculate Pearson's \(r\) and Spearman's \(r_s\).
- From the calculator, raw data: \(r = 0.965\)
- Ranks of x: 3, 5, 7, 2, 8, 4, 6, 1
- Ranks of y: 3, 6, 5, 2, 8, 4, 7, 1
- From the calculator, ranks: \(r_s = 0.929\)
(b) Describe the correlation between hours of sunshine and ice creams sold.
- \(r_s = 0.929\): a strong positive association. As hours of sunshine increases, ice creams sold tends to increase. This does not show that one causes the other.
- \(r\) and \(r_s\) are close, so the relationship is close to linear.
Stretch
-
A student records the hours she revised (x) and her score (y) in eight weekly quizzes. The last pair is from a quiz that was unusually easy. Her data: x: 1, 2, 3, 4, 6, 7, 8, 5 y: 12, 15, 19, 22, 28, 33, 36, 70
(a) Calculate Pearson's \(r\) and Spearman's \(r_s\) for all eight pairs.
- Ranks of x: 1, 2, 3, 4, 6, 7, 8, 5
- Ranks of y: 1, 2, 3, 4, 5, 6, 7, 8
- From the calculator: \(r = 0.527\), \(r_s = 0.857\)
(b) The last pair is an outlier. Remove it and calculate \(r\) and \(r_s\) again for the remaining seven pairs.
- Ranks of x: 1, 2, 3, 4, 5, 6, 7
- Ranks of y: 1, 2, 3, 4, 5, 6, 7
- From the calculator: \(r = 0.998\), \(r_s = 1\)
(c) Which coefficient was affected more by the outlier? Explain why.
- The change in r is 0.472; the change in \(r_s\) is 0.143.
- Pearson's r uses the actual values, so one extreme value has a large effect. Spearman's uses only ranks.
jmaths.xyz · AI SL · 13.3.8 Spearman's rank correlation and comparison with Pearson's r