Free worked solutions · 2026 Edition

IB Maths AI SL Chapter 9: Correlation and regression worked solutions

Worked solutions to the practice questions in Chapter 9 of Photon Guidebook: Mathematics Applications and Interpretation SL for the IB Diploma (2026 Edition). Each solution shows every step with the mark it earns, the way an IB mark scheme does.

  • Chapter 9 of 15
  • 26 practice questions
  • 2 Going further
  • Free, no sign-up

Basics

One idea at a time, in the order the chapter teaches them.

Question 1

[2 marks]
Pearson correlation r measures the direction and strength of linear association, with -1\le r\le1. A dataset gives r=-0.87.
Describe its linear correlation and explain the negative sign.
[2]
Show solutionHide solution
Strong negative linear correlation.
A1
As one variable increases, the other tends to decrease.
R1

Final answer

strong negative linear correlation: as one variable increases the other tends to decrease

Question 2

[2 marks]
The points (1,8),(2,6),(3,4),(4,2) all lie on a downward straight line.
State Pearson r without using a GDC and justify.
[2]
Show solutionHide solution
r=-1.
A1
Every point lies exactly on a straight line with negative gradient.
R1

Final answer

r=-1: all the points lie on one straight line with negative gradient

Question 3

[4 marks]
For five printers, x is jobs queued and y is completion delay in minutes.
\begin{array}{c|rrrrr}x&2&5&9&14&18\\\hline y&3.1&4.8&8.4&10.1&13.7\end{array}
Use a GDC to find the least-squares regression line of y on x and Pearson r, giving coefficients to 4 significant figures.
[4]
Show solutionHide solution
Enter the x and paired y lists and select linear regression of y on x.
M1
y=0.6433x+1.845. A1A1
r=0.9909.
A1

Final answer

y=0.6433x+1.845, r=0.9909

Question 4

[3 marks]
A model for packing duration y (minutes) from carton volume x (litres) is y=0.84x+2.6. Observed volumes range from 3 to 17 litres.
Interpret the gradient with units and predict duration for 12 litres.
[3]
Show solutionHide solution
Predicted duration increases by 0.84 minutes for each extra litre.
R1
y=0.84(12)+2.6.
M1
12.68 minutes.
A1

Final answer

0.84 minutes more for each extra litre; 12.68 minutes

Question 5

[3 marks]
A model y=72.6-1.35x predicts remaining fibre length y (m) after x splices. Data used values 5\le x\le24.
Find the model prediction for 40 splices and assess its reliability.
[3]
Show solutionHide solution
y=72.6-1.35(40).
M1
18.6 m.
A1
Unreliable extrapolation: 40 lies outside the observed range.
R1

Final answer

18.6 m; unreliable, because 40 is outside the data range 5 to 24

Question 6

[2 marks]
In a survey, neighbourhood tree coverage and bicycle use have r=0.76.
Explain why this is not sufficient evidence that planting trees causes more bicycle use.
[2]
Show solutionHide solution
Correlation establishes association, not a causal mechanism.
R1
Another variable, such as road design, could affect both.
R1

Final answer

association only; a third variable could affect both

Question 7

[3 marks]
A set of texture score measurements is 27, 18, 33, 27, 41, 27, 12. Use rank 1 for the smallest measurement and average ranks for ties.
(a) Find the ranks in the listed order.
[2]
(b) Explain the rank assigned to the first repeated measurement.
[1]
Show solutionHide solution
(a) Order the observations and average the occupied positions for each tied group.
M1
The rank list is 4, 2, 6, 4, 7, 4, 1.
A1
(b) The three scores of 27 occupy positions 3, 4 and 5, so each receives (3+4+5)/3=4.
R1

Final answer

4, 2, 6, 4, 7, 4, 1; the three values of 27 share positions 3 to 5

Question 8

[4 marks]
A survey records training hours (X) and fault counts (Y) for the same subjects.
\begin{array}{c|rrrrr}X&14&22&31&37&48\\Y&61&58&47&53&39\end{array}
Use rank 1 for the lowest value in each list.
(a) Write both rank lists, using average ranks for any ties.
[2]
(b) Use Pearson correlation on the two rank lists to find r_s to 3 significant figures.
[2]
Show solutionHide solution
(a) R_X=(1, 2, 3, 4, 5).
A1
R_Y=(5, 4, 2, 3, 1).
A1
(b) Enter the rank lists as paired GDC data and calculate their Pearson correlation.
M1
r_s=-0.900.
A1

Final answer

ranks of X: 1 to 5; ranks of Y: 5, 4, 2, 3, 1; r_s=-0.900

Question 9

[4 marks]
Two inspectors give the following ranks to the same objects. Neither list has ties.
\begin{array}{c|rrrrrr}R_A&1&2&3&4&5&6\\R_B&6&4&5&2&3&1\end{array}
You may use r_s=1-\frac{6\sum d^2}{n(n^2-1)}, where d=R_A-R_B.
(a) Find \sum d^2.
[2]
(b) Calculate r_s to 3 significant figures.
[2]
Show solutionHide solution
(a) The differences are -5, -2, -2, 2, 2, 5.
M1
\sum d^2=66.
A1
(b) r_s=1-\frac{6(66)}{6(35)}.
M1
r_s=-0.886.
A1

Final answer

\sum d^2=66; r_s=-0.886

Question 10

[3 marks]
A process produces an overall increasing scatter plot with some small reversals and a clearly curved pattern. GDC output is r=0.71 and r_s=0.96.
(a) Explain why Spearman describes the ordering more closely.
[2]
(b) State what Pearson measures in this comparison.
[1]
Show solutionHide solution
(a) Spearman compares ranks.
A1
A consistently increasing ordering can have strong rank association even when the pattern is curved.
R1
(b) Pearson measures the strength of linear association between the original numerical values.
R1

Final answer

Spearman follows the order along a curve; Pearson measures closeness to a straight line

Tutorial

Exam-style questions on each question type, with the marks the IB would give.

Question 11

[5 marks]
A school canteen tries seven different prices, p dollars, for a bowl of noodles on seven days and records the number, n, of bowls sold on each day.
\begin{array}{@{}l@{\,}|@{\,}*{7}{c@{\;}}@{}} p & \text{1.50} & \text{2.00} & \text{2.50} & \text{3.00} & \text{3.50} & \text{4.00} & \text{4.50} \\ n & \text{96} & \text{88} & \text{91} & \text{74} & \text{70} & \text{61} & \text{52} \end{array}
(a) Use your GDC to find Pearson's correlation coefficient, r.
[2]
(b) Describe the correlation between p and n, in context.
[2]
(c) The canteen manager says: “Because r is negative, the line of best fit must have a negative gradient.” State whether she is correct, giving a reason.
[1]
Show solutionHide solution
(a) Enter p and n in two lists; Statistics \to Linear Regression. The GDC gives r=-0.974941\ldots so
r = \textbf{-0.975}
M1A1
[2]
(b) r=-0.975 indicates a strong negative linear correlation: higher prices are associated with fewer bowls sold. A1R1
[2]
(c) Correct: the gradient of the regression line has the same sign as r (here the GDC gives gradient −14.8).
R1[1]

Final answer

  • (a) r=-0.975
  • (b) strong negative: a higher price goes with fewer bowls sold
  • (c) correct; the gradient is −14.8

Question 12

[6 marks]
Nia runs a print shop. Using the data from past orders of between 50 and 400 posters, she finds that the regression line of C on n is
C = 0.42n + 18.5,
where n is the number of posters printed and C is the cost of the order in dollars.
(a) State which variable is the explanatory variable.
[1]
(b) Interpret the value 0.42 in this context.
[2]
(c) Interpret the value 18.5 in this context, and say whether it is a reasonable interpretation.
[2]
(d) Use the regression line to estimate the cost of printing 250 posters.
[1]
Show solutionHide solution
(a) The number of posters printed, n.
A1[1]
(b) Each extra poster printed is associated with an increase in cost of about \$0.42 (42 cents) per poster. A1R1
[2]
(c) The estimated cost when n=0 is \$18.50: this can be read as a set-up (fixed) charge for any order.
R1[1]
It is a reasonable reading here, but n=0 lies outside the data range (50 to 400), so the value is an extrapolation and should be treated with caution.
R1[1]
(d) C=0.42(250)+18.5=\textbf{\$123.50}.
A1[1]

Final answer

  • (a) n
  • (b) USD 0.42 per poster
  • (c) a fixed charge of USD 18.50; extrapolation
  • (d) USD 123.50

Question 13

[6 marks]
The battery level, B\%, of a tablet is recorded t hours after it is unplugged, for t from 1 to 7. The regression line of B on t is B=-11.2t+98.9 and Pearson's correlation coefficient is r=-0.9996.
(a) Estimate the battery level after 4.5 hours.
[2]
(b) Estimate the battery level after 10 hours and comment on your answer.
[2]
(c) State, with a reason, whether your estimate in part (a) is reliable.
[1]
(d) Interpret the value −11.2.
[1]
Show solutionHide solution
(a) B=-11.2(4.5)+98.9=\textbf{48.5} %. M1A1
[2]
(b) B=-11.2(10)+98.9=-13.1: a negative battery level is impossible, and t=10 is outside the data range (1 to 7) so it is an extrapolation and unreliable. A1R1
[2]
(c) Reliable: 4.5 is within the range of t (interpolation) and r=-0.9996 shows a very strong linear correlation.
R1[1]
(d) The battery level falls by about 11.2 percentage points for each extra hour.
R1[1]

Final answer

  • (a) 48.5%
  • (b) −13.1%: impossible, extrapolation
  • (c) reliable
  • (d) 11.2 points per hour

Question 14

[6 marks]
A sports scientist studies how the time, t seconds, to run 100 m depends on the age, a years, of club athletes. Her sample contains athletes aged from 18 to 35 years, and she finds a regression line of t on a with a strong positive correlation.
(a) For each of the ages 16, 22, 35 and 40 years, state whether using the regression line to estimate t would be interpolation or extrapolation.
[2]
(b) Explain why an estimate made by extrapolation is less reliable than one made by interpolation.
[1]
(c) State two conditions that must both be satisfied for an estimate from a regression line to be considered reliable.
[2]
(d) A coach uses the line to predict the time of a 60-year-old. Give one reason, other than the age being outside the sample, why the prediction may be unreliable.
[1]
Show solutionHide solution
(a) 16: extrapolation (below 18). 22: interpolation. 35: interpolation (within the range, at its upper limit). 40: extrapolation (above 35). A1A1
[2]
(b) Outside the data range there is no evidence that the linear pattern continues, so the line may no longer describe the relationship.
R1[1]
(c) The correlation is strong (|r| close to 1),
R1[1]
and the value of the explanatory variable lies inside the range of the data (interpolation).
R1[1]
(d) For example: the sample contains only club athletes, who may differ from a 60-year-old; or the relationship is likely to become steeper (non-linear) at older ages; or any other valid reason.
R1[1]

Final answer

  • (a) 16 E, 22 I, 35 I, 40 E
  • (b) to (d) reasons given in the full solution

Question 15

[5 marks]
Eight students in a quiz league finish a season with the following numbers of points.
\begin{array}{@{}l@{\,}|@{\,}*{8}{c@{\;}}@{}} \text{Student} & \text{A} & \text{B} & \text{C} & \text{D} & \text{E} & \text{F} & \text{G} & \text{H} \\ \text{Points} & \text{14} & \text{17} & \text{14} & \text{9} & \text{17} & \text{12} & \text{14} & \text{6} \end{array}
(a) Rank the students from highest points (rank 1) to lowest, giving tied students the mean of the ranks they share.
[3]
(b) Now rank the students from lowest points (rank 1) to highest. Write down the rank of student D, and of student E.
[1]
(c) Explain why the sum of the eight ranks is the same in (a) and (b), and state its value.
[1]
Show solutionHide solution
(a) The two 17s share positions 1 and 2: rank 1.5 each.
A1[1]
The three 14s share positions 3,4,5: rank 4 each.
A1[1]
\begin{array}{l|cccccccc} \text{Student} & \text{A} & \text{B} & \text{C} & \text{D} & \text{E} & \text{F} & \text{G} & \text{H} \\ \hline \text{Rank} & \text{4} & \text{1.5} & \text{4} & \text{7} & \text{1.5} & \text{6} & \text{4} & \text{8} \end{array}
D =7, F =6, H =8.
A1[1]
(b) Lowest first: D has rank \textbf{2} and E has rank \textbf{7.5}.
A1[1]
(c) Giving tied values the mean of their positions keeps the total equal to 1+2+\dots+8=\textbf{36} in both cases.
R1[1]

Final answer

  • (a) 4, 1.5, 4, 7, 1.5, 6, 4, 8
  • (b) D 2, E 7.5
  • (c) 36

Question 16

[7 marks]
Two reviewers, Mei and Noor, each score eight board games out of 10.
\begin{array}{@{}l@{\,}|@{\,}*{8}{c@{\;}}@{}} \text{Game} & \text{1} & \text{2} & \text{3} & \text{4} & \text{5} & \text{6} & \text{7} & \text{8} \\ \text{Mei,} x & \text{7} & \text{9} & \text{6} & \text{8} & \text{9} & \text{5} & \text{7} & \text{8} \\ \text{Noor,} y & \text{6} & \text{9} & \text{7} & \text{7} & \text{8} & \text{4} & \text{8} & \text{9} \end{array}
(a) Rank each reviewer's scores from the highest (rank 1), using mean ranks for tied scores.
[3]
(b) Use your GDC to find Pearson's correlation coefficient between the two lists of ranks. State what this value represents.
[2]
(c) Alex uses r_s=1-\dfrac{6\sum d^2}{n(n^2-1)} and gets a slightly different answer. Find Alex's answer and explain why the two values differ.
[2]
Show solutionHide solution
(a)
\begin{array}{l|cccccccc} \text{Game} & \text{1} & \text{2} & \text{3} & \text{4} & \text{5} & \text{6} & \text{7} & \text{8} \\ \hline \text{Mei rank} & \text{5.5} & \text{1.5} & \text{7} & \text{3.5} & \text{1.5} & \text{8} & \text{5.5} & \text{3.5} \\ \text{Noor rank} & \text{7} & \text{1.5} & \text{5.5} & \text{5.5} & \text{3.5} & \text{8} & \text{3.5} & \text{1.5} \end{array}
(Each reviewer has three pairs of tied scores: the pair sharing positions 1,2 gets 1.5, the pair sharing 3,4 gets 3.5 and the pair sharing 5,6 gets 5.5; Mei's 6 is rank 7 and 5 is rank 8, and Noor's 6 is rank 7 and 4 is rank 8.) A1A1A1
[3]
(b) GDC: Linear Regression on the two rank lists gives r=0.746914\ldots, so \boldsymbol{r_s=0.747}.
M1[1]
This is Spearman's rank correlation coefficient: a fairly strong positive monotonic agreement between the reviewers.
A1[1]
(c) \sum d^2=20.5, so r_s=1-\dfrac{6(20.5)}{8(63)}=\textbf{0.756}.
A1[1]
The formula is only exact when there are no tied ranks; with ties it gives an approximation, while the correlation of the ranks is exact.
R1[1]

Final answer

  • (b) r_s=0.747
  • (c) \sum d^2=20.5 and 0.756: the shortcut is inexact with ties

Question 17

[8 marks]
Eight members of a chess club have ratings, x (a higher rating means a stronger player). Each also solves the same puzzle, taking y seconds.
\begin{array}{@{}l@{\,}|@{\,}*{4}{@{}c@{\,}}@{}} \text{P} & \text{A} & \text{B} & \text{C} & \text{D} \\ x & \text{1450} & \text{1520} & \text{1600} & \text{1680} \\ y & \text{210} & \text{190} & \text{200} & \text{160} \\ \text{P} & \text{E} & \text{F} & \text{G} & \text{H} \\ x & \text{1740} & \text{1810} & \text{1900} & \text{1980} \\ y & \text{170} & \text{140} & \text{120} & \text{125} \end{array}
(a) Rank the players by rating (highest rating is rank 1) and by time (longest time is rank 1). Hence find r_s.
[3]
(b) The club secretary instead ranks the players by time with the fastest as rank 1, and by rating with the highest as rank 1. Find r_s for these ranks.
[2]
(c) Explain the relationship between your two answers.
[1]
(d) State the conclusion about the players that both values support.
[2]
Show solutionHide solution
(a)
\begin{array}{l|cccccccc} \text{Player} & \text{A} & \text{B} & \text{C} & \text{D} & \text{E} & \text{F} & \text{G} & \text{H} \\ \hline \text{Rating rank} & \text{8} & \text{7} & \text{6} & \text{5} & \text{4} & \text{3} & \text{2} & \text{1} \\ \text{Time rank (longest} =1 \text{)} & \text{1} & \text{3} & \text{2} & \text{5} & \text{4} & \text{6} & \text{8} & \text{7} \end{array}
A1A1
[2]
GDC regression on the two rank lists: \boldsymbol{r_s=-0.929}.
A1[1]
(b) With the time ranks reversed (fastest =1): \boldsymbol{r_s=0.929}. A1A1
[2]
(c) The two values have equal magnitude and opposite signs: reversing the ranking direction of one variable changes the sign of r_s but not its size. (Both variables must be ranked the same way for r_s to describe the raw data.)
R1[1]
(d) Higher-rated players tend to solve the puzzle faster: a strong negative monotonic association between rating and time (r_s=-0.929 when ranked the same way); the positive value in (b) reflects that “best” is rank 1 for both variables. R1R1
[2]

Final answer

  • (a) −0.929
  • (b) 0.929
  • (c) reversing one list flips the sign
  • (d) a higher rating goes with a faster time

Question 18

[6 marks]
A librarian records, for six pupils, the number of books each borrowed in a term, x, and the pupil's score, y, in a vocabulary test out of 100.
\begin{array}{l|cccccc} \text{Pupil} & \text{A} & \text{B} & \text{C} & \text{D} & \text{E} & \text{F} \\ \text{Books,} x & \text{12} & \text{7} & \text{12} & \text{3} & \text{9} & \text{5} \\ \text{Score,} y & \text{78} & \text{64} & \text{85} & \text{52} & \text{70} & \text{58} \end{array}
(a) Rank the pupils on each variable, from highest (rank 1), using mean ranks for ties.
[2]
(b) Find Spearman's rank correlation coefficient for the two variables.
[2]
(c) Interpret your answer, and say how the answer would change if the scores were ranked from lowest to highest instead.
[2]
Show solutionHide solution
(a) Books x (pupils A to F): 1.5, 4, 1.5, 6, 3, 5 (the two 12s share positions 1,2). Scores y: 2, 4, 1, 6, 3, 5. A1A1
[2]
(b) GDC: Linear Regression on the two rank lists: r_s=0.985611\ldots=\textbf{0.986}. M1A1
[2]
(c) Strong positive monotonic association: pupils who borrow more books tend to score higher, and the two rankings are almost identical.
R1[1]
Ranking the scores the opposite way would change the sign: r_s=-0.986.
R1[1]

Final answer

  • (a) 1.5, 4, 1.5, 6, 3, 5 and 2, 4, 1, 6, 3, 5
  • (b) 0.986
  • (c) −0.986

Question 19

[6 marks]
For each situation, state whether Pearson's r or Spearman's r_s is more appropriate for measuring the association, and give a reason.
(a) The effect of a drug dose on a patient's response: the response rises steeply at low doses and then levels off, but never falls.
[2]
(b) Daily rainfall and the number of umbrellas sold in a shop: the points lie close to a straight line apart from one very wet day, when a rush of orders gave an unusually large sale.
[2]
(c) The hours a machine has run and its energy use, where the points lie on a straight line and the aim is to find a regression line to make predictions.
[2]
Show solutionHide solution
(a) Spearman's r_s: the relationship is monotonic but curved, so a straight-line measure understates how consistently the response rises with the dose. A1R1
[2]
(b) Spearman's r_s: ranks are much less affected by a single extreme value than Pearson's r, so the outlier would distort r. A1R1
[2]
(c) Pearson's r: the relationship is linear and the aim is a linear model, so r measures how well a straight line fits (and the regression line comes from the same calculation). A1R1
[2]

Final answer

  • (a) Spearman
  • (b) Spearman
  • (c) Pearson

Question 20

[8 marks]
A regional government publishes data on 12 towns, each of which has between 2 and 15 public libraries. The number of libraries in a town is x and the percentage of its adults holding a university degree is y. A blogger finds that the regression line of y on x is
y=0.9x+12
with correlation coefficient r=0.81. The blogger writes: “Building one more library in a town raises the number of graduates by 0.9%. A town with 40 libraries would have 48% graduates.”
(a) Interpret the gradient 0.9 in a way that is supported by the data.
[2]
(b) Explain why the blogger's statement “Building one more library … raises” is not justified.
[2]
(c) Comment on the reliability of the estimate for a town with 40 libraries.
[2]
(d) Suggest a confounding variable, and state how it could link libraries and graduates.
[2]
Show solutionHide solution
(a) Towns with one more library have, on average, a percentage of graduates higher by about 0.9 percentage points (the gradient describes an association). A1R1
[2]
(b) The regression line describes an association between the variables, not a cause: r=0.81 does not show that libraries produce graduates (the direction could be reversed, or a third variable could drive both). R1R1
[2]
(c) x=40 is far outside the range 2 to 15: extrapolation, so the estimate y=0.9(40)+12=48\% is unreliable. The line may not continue, and r=0.81 is only moderately strong. R1R1
[2]
(d) For example, town size or wealth: larger or wealthier towns have more libraries and also more graduates. A1R1
[2]

Final answer

  • (a) 0.9 percentage points per library
  • (b) association only
  • (c) 48%, extrapolation
  • (d) town size or wealth

Mastery

Full exam questions that mix question types, at Paper 1 and Paper 2 standard.

Question 21

[6 marks]
A meteorology student collects data on seven regions, recording the annual rainfall x (in mm) and the average crop yield y (in tonnes per hectare).
x (mm)200300400500600700800
y1.82.63.33.94.24.13.6
(a) Use your GDC to find the Pearson product-moment correlation coefficient r.
[2]
(b) The value of r is only moderately close to 1. By describing the pattern in the table, explain why a straight-line model does not fit these data well.
[2]
(c) Suggest, with a reason, why yield falls when rainfall becomes very high.
[2]
Show solutionHide solution
(a) Using GDC, r = 0.818 (3 s.f.).
[2]
(b) The yield rises as rainfall increases up to about 600 mm, then falls for higher rainfall. This shows a curved (roughly parabolic) relationship, not a straight line, so a linear model fits poorly and r is only moderate.
[2]
(c) At very high rainfall the ground may become waterlogged, which harms the crop, so yield decreases.
[2]

Final answer

  • (a) r=0.818
  • (b) yield rises then falls: the relationship is curved
  • (c) waterlogging

Question 22

[11 marks]
A small business tracks its monthly advertising spend x (in thousands of dollars) and its monthly revenue y (in thousands of dollars) over seven months.
x ($000)2468101214
y ($000)18252936414450
(a) (i) Use your GDC to find the Pearson product-moment correlation coefficient r.
(ii) Describe the correlation between advertising spend and revenue.
[3]
(b) Find the equation of the least-squares regression line of y on x, giving coefficients to 3 significant figures.
[2]
(c) Use your line to estimate the revenue in a month when $9000 is spent on advertising.
[2]
(d) The owner argues that spending $0 on advertising would still give revenue equal to the y-intercept of the line. State, with a reason, whether this is a reliable estimate.
[2]
(e) The owner plans to spend $50 000 next month and the line predicts revenue of about $144 000. Comment on the reliability of this prediction.
[2]
Show solutionHide solution
(a) (i) Using GDC, r = 0.996 (3 s.f.).
(ii) Since r is positive and very close to 1, there is a strong positive correlation between advertising spend and revenue.
[3]
(b) Using GDC, y = 2.61x + 13.9.
[2]
(c) Here x=9 (thousand dollars): y = 2.61(9) + 13.9 \approx 37.3, so about $37 300.
[2]
(d) The y-intercept 13.9 corresponds to x=0, which lies just outside the data range (x from 2 to 14), so it is an extrapolation and only a rough estimate; it may not be reliable.
[2]
(e) x=50 is far outside the data range (2 to 14), so predicting revenue there is extrapolation and is unreliable; the linear trend may not continue at such high spending.
[2]

Final answer

  • (a) r=0.996
  • (b) y=2.61x+13.9
  • (c) about USD 37 300
  • (d), (e) extrapolation

Question 23

[9 marks]
Six data points have x=1,2,3,4,5,6. The first five values of y are 1,2,3,4,5 and the sixth, k, is an integer greater than 5.
(a) Write down the value of Spearman's r_s for these data, and explain why it does not depend on k.
[2]
(b) Find the smallest integer k for which Pearson's r<0.75. Justify your answer using your GDC.
[3]
(c) A student claims that if r_s is close to 1 then r must be close to 1. Use your answers to comment.
[1]
(d) Give a set of six data points for which r>0.95 but r_s<0, and verify with your GDC that your points work. (Hint: use the idea of part (b).)
[3]
Show solutionHide solution
(a) r_s=\textbf{1}.
A1[1]
Because k>5 the sixth point has the largest y and the largest x, so the ranks of x and of y are identical (1,\dots,6) whatever the value of k.
R1[1]
(b) Enter x=1,\dots,6 and y=1,2,3,4,5,k, and use Linear Regression for different k (or store r as a function of k and use a table):
k=28: r=0.7522, which is not below 0.75; M1A1
[2]
k=29: r=0.7488<0.75.
A1[1]
The table of r against k shows r decreasing steadily as k increases (0.9897 at k=7, 0.9686 at k=8, \dots), so every k from 6 to 28 gives r>0.75. The smallest value is \textbf{k=29}.
(c) The statement is false: r_s=1 for every k, yet r falls to about 0.7 and below when k is large. A strong monotonic association does not guarantee a strong linear one.
R1[1]
(d) For example (1,9),(2,8),(3,7),(4,6),(5,5),(40,60) (many answers possible). Five points follow a perfectly decreasing pattern and one distant point is high on both axes.
A1[1]
GDC: r=0.987>0.95 (the distant point dominates r).
A1[1]
Ranks of x: 1,2,3,4,5,6; ranks of y: 5,4,3,2,1,6 (ascending); r_s=-0.143<0.
A1[1]

Final answer

  • (a) r_s=1
  • (b) k=29
  • (c) false
  • (d) for example r=0.987 and r_s=-0.143

Question 24

[12 marks]
A taxi company in Lisbon records the distance, d km, and the fare, F EUR, for seven trips.
d235791215
F6.407.8010.6012.2015.8018.6021.20
Marta models the fares with the straight line through the points (3, 7.80) and (12, 18.60).
(a) Find the gradient of Marta's line.
[2]
(b) Interpret the gradient in context.
[1]
(c) Find the equation of Marta's line.
[1]
(d) State what the constant term in Marta's equation represents.
[1]
(e) Find the mean point (\bar d, \bar F) of the seven trips.
[2]
(f) Find the equation of the regression line of F on d, and the value of r.
[2]
(g) Estimate the fare for an 8 km trip using each model.
[2]
(h) Comment on using the line to estimate the fare for a 40 km trip.
[1]
Show solutionHide solution
(a) \frac{18.60-7.80}{12-3} M1 =1.2 A1 (b) The fare rises by EUR 1.20 for each extra kilometre R1 (c) c=7.80-1.2(3)=4.2, so F=1.2d+4.2 A1 (d) A fixed charge of EUR 4.20 at the start of every trip R1 (e) \bar d=\frac{53}{7}=7.57 M1 \bar F=\frac{92.6}{7}=13.2, so (7.57, 13.2) A1 (f) F=1.16d+4.48 A1 r=0.995 A1 (g) Marta: 1.2(8)+4.2= EUR 13.80 A1 Regression: 1.156(8)+4.476= EUR 13.72 A1 (h) 40 km is far outside the data (2 km to 15 km): extrapolation, so the estimate is unreliable
R1

Final answer

  • (a) 1.2
  • (b) EUR 1.20 per kilometre
  • (c) F=1.2d+4.2
  • (d) a fixed charge of EUR 4.20
  • (e) (7.57,\ 13.2)
  • (f) F=1.16d+4.48, r=0.995
  • (g) EUR 13.80 and EUR 13.72
  • (h) extrapolation

Question 25

[7 marks]
Ravi believes that cafés further from the main train station in his city have fewer customers. For ten cafés he records the distance from the station, d m, and the number of customers, c, on one Saturday.
d (m)120250310400480
c340300350260310
d (m)550620700820950
c240300285270315
(a) Rank the distances and the numbers of customers, giving rank 1 to the largest value in each row.
[2]
(b) Find Spearman's rank correlation coefficient, r_s.
[2]
Ravi tests his belief at the 5% significance level. The null hypothesis, H_0, is that distance and number of customers have no monotonic relationship.
(c) Write down the alternative hypothesis.
[1]
(d) The critical value at this level is 0.564. Decide whether the data support Ravi's belief, giving a reason.
[2]
Show solutionHide solution
(a) d: 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 A1 c: 2, 5.5, 1, 9, 4, 10, 5.5, 7, 8, 3 A1 (b) Pearson's r of the two lists of ranks M1 r_s=-0.316 A1 (c) H_1: there is a negative monotonic relationship between distance and number of customers A1 (d) |r_s|=0.316<0.564 M1 The belief is not supported: do not reject H_0, as there is not enough evidence that cafés further from the station have fewer customers
A1

Final answer

  • (a) d: 10, 9, 8, 7, 6, 5, 4, 3, 2, 1; c: 2, 5.5, 1, 9, 4, 10, 5.5, 7, 8, 3
  • (b) r_s=-0.316
  • (c) H_1: negative monotonic relationship
  • (d) 0.316<0.564: do not reject H_0

Question 26

[15 marks]
A running club records, for nine runners A to I, the mean weekly training distance, x km, over three months and each runner's time, y minutes, in a marathon at the end of that time.
RunnerABCDEFGHI
x (km)324538605245702858
y (min)262231248205222236198271290
(a) Rank the distances and the times, giving rank 1 to the largest value in each row, and find Spearman's rank correlation coefficient, r_s.
[4]
(b) Find Pearson's correlation coefficient, r, for the nine runners.
[1]
Runner I ran the marathon with an ankle injury.
(c) Explain why r_s is less affected than r by runner I's result.
[2]
(d) For the other eight runners, use your GDC to find the regression line of y on x.
[2]
(e) Interpret the gradient of this line in context.
[1]
(f) Use the line to estimate the marathon time of a runner who trains 50 km a week.
[1]
(g) For all nine runners, a test at the 5% level for a negative monotonic relationship has critical value 0.600. Use your result in (a) to decide whether the data support such a relationship, giving a reason.
[2]
(h) A coach uses the line from part (d) to predict the time of a runner who trains 110 km a week. Comment on this.
[1]
(i) Runner C's distance is checked and changed from 38 km to 39 km. Explain why your value of r_s in part (a) does not change.
[1]
Show solutionHide solution
(a) Distance ranks A 8, B 5.5, C 7, D 2, E 4, F 5.5, G 1, H 9, I 3 A1 Time ranks A 3, B 6, C 4, D 8, E 7, F 5, G 9, H 2, I 1 A1 Pearson's r of the two lists of ranks M1 r_s=-0.644 A1 (b) r=-0.575 A1 (c) Runner I is an extreme value: in r the large time, far from the line, pulls r towards 0 R1 In r_s runner I is simply rank 1 for time, whatever the size of the time R1 (d) y=-1.80x+317 A1A1 (e) Each extra kilometre of weekly training goes with a marathon about 1.80 minutes faster R1 (f) -1.80211(50)+317.472=227 minutes A1 (g) -0.644\le-0.600 M1 Reject H_0: the data support a negative monotonic relationship between training distance and marathon time, even with runner I included A1 (h) 110 km is far above the largest distance (70 km): extrapolation, so the estimate is unreliable R1 (i) 39 km is still between 45 km (B and F) and 32 km (A), so C is still 7th and no rank changes
R1

Final answer

  • (a) r_s=-0.644
  • (b) r=-0.575
  • (c) ranks resist an extreme value
  • (d) y=-1.80x+317
  • (e) 1.80 minutes faster per extra kilometre
  • (f) 227 minutes
  • (g) -0.644\le-0.600: reject H_0
  • (h) extrapolation
  • (i) C is still 7th

Going further

Beyond the syllabus: the worked examples and investigations of the chapter's Going further pages.

G1 The best line is the vertex of a quadratic

G1 Worked example

[8 marks]
Tariq hangs four loads, x kg, from a spring and measures its extension, y mm: (1,3), (2,4), (3,8), (4,9).
(a) Find the mean point.
[1]
(b) For a line y=6+m(x-2.5), show that the total of the squared vertical gaps is S(m)=5m^2-22m+26.
[3]
(c) Find the value of m that makes S(m) as small as possible, and the smallest value of S(m).
[3]
(d) Write down the equation of the line of best fit and check it with your GDC.
[1]
Show solutionHide solution
(a) \bar x=\frac{10}{4}=2.5, \bar y=\frac{24}{4}=6, so (2.5,\,6) A1 (b) Each vertical gap is (y-6)-m(x-2.5) M1 \sum(y-6)^2=9+4+4+9=26, \sum(x-2.5)(y-6)=4.5+1+1+4.5=11, \sum(x-2.5)^2=5 A1 S(m)=26-2(11)m+5m^2=5m^2-22m+26 A1AG (c) The vertex is at m=-\frac{-22}{2(5)} M1 m=2.2 A1 S(2.2)=5(4.84)-22(2.2)+26=1.8 A1 (d) y=6+2.2(x-2.5)=2.2x+0.5, and the GDC regression gives a=2.2, b=0.5
A1

Final answer

  • (a) (2.5,\,6)
  • (c) m=2.2, S=1.8
  • (d) y=2.2x+0.5

G2 The shortcut for r_s needs no ties

G2 Investigation

[15 marks]
Rafael records the number of hours, x, that four volunteers spend on a language app in one week and their quiz scores, y: (1,3), (2,6), (4,7), (5,12).
(a) Find the mean point.
[1]
(b) A line through the mean point with gradient m has equation y=7+m(x-3). For m=1.5, find the four vertical gaps (observed y minus the value on the line) and the total of their squares.
[2]
(c) Repeat part (b) for m=2.
[2]
(d) Show that, for any value of m, the total of the squared vertical gaps is S(m)=10m^2-38m+42.
[3]
(e) Find the value of m that makes S(m) as small as possible, and the smallest value of S(m).
[2]
(f) Use your GDC to find the regression line of y on x, and compare it with your answer to part (e).
[2]
(g) Explain why the line in part (f) is called the line of best fit.
[1]
(h) Write down Spearman's r_s for these data, giving a reason.
[2]
Show solutionHide solution
(a) \bar x=\frac{12}{4}=3, \bar y=\frac{28}{4}=7, so (3,\,7) A1 (b) The values on the line are 4, 5.5, 8.5, 10, so the gaps are -1, 0.5, -1.5, 2 A1 The total is 1+0.25+2.25+4=7.5 A1 (c) The values on the line are 3, 5, 9, 11, so the gaps are 0, 1, -2, 1 A1 The total is 0+1+4+1=6 A1 (d) Each gap is (y-7)-m(x-3) M1 \sum(y-7)^2=42, \sum(x-3)(y-7)=19, \sum(x-3)^2=10 A1 S(m)=42-2(19)m+10m^2=10m^2-38m+42 A1AG (e) m=\frac{38}{20}=1.9 M1 S(1.9)=10(3.61)-38(1.9)+42=5.9 A1 (f) y=1.9x+1.3 A1 This is the same line, because 7+1.9(x-3)=1.9x+1.3 A1 (g) No other line through the mean point has a smaller total of squared vertical gaps R1 (h) r_s=1 A1 y increases every time x increases, so the two rankings are identical
R1

Final answer

  • (a) (3,\,7)
  • (b) gaps -1, 0.5, -1.5, 2, total 7.5
  • (c) gaps 0, 1, -2, 1, total 6
  • (e) m=1.9, S=5.9
  • (f) y=1.9x+1.3
  • (h) r_s=1

From the book

Photon Guidebook: Mathematics Applications and Interpretation SL for the IB Diploma

Chapter 9 teaches correlation and regression from the basics to full exam questions: how the IB asks it, every question type with a marked example, and these practice questions in three steps.

About the book