jmaths
IB Mathematics: Applications and Interpretation SL · 13.3: Statistics · 13.3.7
Linear regression and prediction Problem set B Worked solutions
Skills
-
A theatre records the ticket price x (€) and the number y of tickets sold for 8 different shows. x: 20, 25, 30, 35, 40, 45, 50, 55 y: 87, 76, 79, 64, 61, 52, 47, 38
(a) Find the equation of the regression line of y on x.
- From the calculator: \(a=-1.36\), \(b=114\)
- \(y=-1.36x+114\)
(b) Use the line to predict y when x = 42.
- \(y=-1.36\times42+114=56.9\)
- 42 is inside the range of the data, so this is a reliable estimate
-
A household records the average outside temperature x (°C) and the electricity bill y (€) for 24 months, with x from 2 to 24. The regression line of y on x is \(y=145-3.8x\).
(a) Interpret the gradient.
- The gradient is −3.8
- For each extra °C (x up by 1) the bill y falls by €3.8 on average
(b) Interpret the intercept.
- The intercept is 145: the value of y when x = 0
- The model gives a bill of €145 at 0 °C
- x = 0 is outside the data range 2 to 24, so this is a modelled value
-
On 9 days, a library records the number of visitors x (in tens) and the number y of books borrowed. x: 3, 4, 6, 7, 9, 10, 12, 13, 15 y: 21, 26, 24, 30, 31, 34, 33, 2, 36
(a) Find the quartiles of y. Use the 1.5 × IQR rule to test y for outliers.
- From the calculator: \(Q_1=22.5\), \(Q_3=33.5\), IQR = 11
- Limits: \(22.5-1.5\times11=6\) and \(33.5+1.5\times11=50\)
- 2 is below the limit: an outlier in y
(b) Test x for outliers.
- \(Q_1=5\), \(Q_3=12.5\), IQR = 7.5
- Limits: −6.25 and 23.8
- Every x value is inside the limits: no outlier in x
-
The population y (thousands) of a town is recorded x years after the year 2000, for x from 5 to 20. The regression line of y on x is \(y=3.7x+41\), with r = 0.96.
(a) Predict y when x = 12.
- \(y=3.7\times12+41=85.4\)
- 12 is inside the range 5 to 20 years: interpolation, so the estimate is reliable
(b) Predict y when x = 45. Comment on the reliability of this prediction.
- \(y=3.7\times45+41=207.5\)
- 45 is outside the range 5 to 20 years: extrapolation
- Growth is unlikely to stay linear for 25 years beyond the data, so this prediction is unreliable
In context
-
For 10 winter days, the outside temperature x (°C) and the gas used y (m³) in a house are recorded. x: 10, 12, 14, 16, 18, 20, 22, 24, 26, 28 y: 96, 86, 83, 73, 40, 63, 52, 50, 42, 33
(a) Write down the coordinates of the point that does not fit the pattern.
- On the diagram, (18, 40) is far above the line of the others
(b) Find the regression line of y on x with and without this point.
- All 10 points: \(y=-3.27x+124\), \(r=-0.910\)
- Without (18, 40): \(y=-3.36x+128\), \(r=-0.996\)
(c) Describe the effect of the point on the line and on r.
- With the point the gradient is −3.27; without it, −3.36
- |r| is 0.910 with the point and 0.996 without it
- The point does not follow the pattern, so it weakens the correlation and moves the line
-
A hot drink is left to cool. Its temperature y (°C) after x minutes is: x: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 y: 80, 66, 55, 41, 29, 24, 22, 21, 18, 16
(a) Plot the data. Explain why one line is not a good model.
- The points fall steeply for 5 to 25 minutes, then more gently
- One line would fit neither part well
(b) Find the regression line for each part.
- 5 to 25 minutes: \(y=-2.54x+92.3\)
- 30 to 50 minutes: \(y=-0.4x+36.2\)
(c) Predict y when x = 17.
- x = 17 is in the part 5 to 25 minutes
- \(y=-2.54\times17+92.3=49.1\)
-
A runner records the distance x (km) she trains in a week and her time y (minutes) for a 5 km race on 18 weeks. The distances ranged from 15 km to 50 km. The regression line of y on x is \(y=-0.21x+31.5\) and the mean distance was 38 km.
(a) Find the mean race time.
- The mean point is on the line: \(\bar{y}=-0.21(38)+31.5\)
- \(\bar{y}=23.52\), so the mean time is 23.5 minutes (3 s.f.)
(b) She solves \(20=-0.21x+31.5\) to find the training distance needed for a time of 20 minutes. Explain why this is not a reliable use of the regression line.
- The line of y on x makes the vertical distances small: it is for estimating y from x.
- Solving for x gives \(x=\frac{20-31.5}{-0.21}=54.8\), which is outside the range 15 to 50: extrapolation, so it is not reliable.
Stretch
-
A phone has x apps open, and y% of the battery left after an hour. x: 5, 6, 8, 9, 11, 12, 14, 15 y: 42, 39, 35, 33, 28, 25, 20, 18 In power-saving mode, with 16 apps open, 40% is left. Add the point (16, 40).
(a) Find the regression line and r for the original data.
- \(y=-2.4x+54\), \(r=-0.999\)
(b) Find the regression line and r when the new point is included.
- Add (16, 40) to both lists
- \(y=-1.35x+45.5\), \(r=-0.604\)
(c) Describe the effect of the new point.
- The gradient changes from −2.4 to −1.35
- |r| falls from 0.999 to 0.604
- the new point lies well above the trend, so it flattens the line and weakens the correlation
-
A survey of 50 teenagers finds the regression line \(y=8.9-0.35x\) for hours of sleep y on daily screen time x (hours), with x from 1 to 8 and r = −0.52.
(a) Interpret the intercept. Explain why it should be treated with care.
- The intercept 8.9 is the value of y when x = 0
- The model gives 8.9 hours of sleep for a teenager with no screen time
- x = 0 is outside the range 1 to 8: an extrapolation
(b) Predict y when x = 5 and when x = 16. Comment on each prediction.
- \(y=8.9-0.35\times5=7.15\): inside the range, but |r| = 0.52 is only moderate, so the estimate is rough
- \(y=8.9-0.35\times16=3.3\): outside the range 1 to 8, so unreliable
jmaths.xyz · AI SL · 13.3.7 Linear regression and prediction