Free worked solutions · 2026 Edition

Chapter 12: Statistics worked solutions

Worked solutions to the practice questions in Chapter 12 of The Ultimate Guide for the IB: Mathematics: Analysis and Approaches HL (2026 Edition). Each solution shows every step with the mark it earns, the way an IB mark scheme does.

  • Chapter 12 of 19
  • Volume 2
  • 22 practice questions
  • 4 Going further
  • Free, no sign-up

Basics

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

Question 1

[3 marks]
A climbing club has 240 members: 90 juniors, 110 adults and 40 seniors. The club wants a stratified sample of 48 members, with the groups in the same proportions as in the club.
Find the number of juniors, adults and seniors in the sample.
[3]
Show solutionHide solution
sampling fraction \dfrac{48}{240} = \dfrac{1}{5} (or \dfrac{90}{240} \times 48)
M1
juniors \dfrac{90}{5} = 18, adults \dfrac{110}{5} = 22
A1
seniors \dfrac{40}{5} = 8
A1
Note: check 18 + 22 + 8 = 48.

Final answer

18 juniors, 22 adults, 8 seniors

Question 2

[6 marks]
A climbing coach records the number of attempts, x, that each of 75 students needed to complete a beginner route.
Attempts x123456
Students172318953
(a) Find the mean number of attempts.
[2]
(b) Write down the standard deviation.
[1]
(c) Find the variance.
[1]
(d) Find the interquartile range.
[2]
Show solutionHide solution
(a) values 1 to 6 entered with frequencies 17,\ 23,\ 18,\ 9,\ 5,\ 3 (or \dfrac{196}{75}) (M1)
\bar{x}=2.61\ (2.61333\ldots)
A1
(b) \sigma=1.35\ (1.345544\ldots)
A1
(c) \sigma^2=1.81\ (1.810488\ldots)
A1
(d) Q_1=2, Q_3=3 (A1)
\text{IQR}=1
A1

Final answer

  • (a) 2.61
  • (b) 1.35
  • (c) 1.81
  • (d) 1

Question 3

[7 marks]
Five students each folded as many origami cranes as they could in ten minutes. The numbers of cranes were
3, \quad 7, \quad 8, \quad 10, \quad 12
(a) Find the mean, \mu.
[1]
(b) Find the variance, \sigma^2, using \sigma^2 = \dfrac{\sum (x - \mu)^2}{n}.
[3]
(c) Show that \sigma^2 = \dfrac{\sum x^2}{n} - \mu^2 gives the same value.
[2]
(d) Write down the exact value of the standard deviation.
[1]
Show solutionHide solution
(a) \mu = \dfrac{40}{5} = 8
A1
(b) deviations -5,\ -1,\ 0,\ 2,\ 4 (M1)
\sum (x - \mu)^2 = 25 + 1 + 0 + 4 + 16 = 46
A1
\sigma^2 = \dfrac{46}{5} = 9.2
A1
(c) \sum x^2 = 9 + 49 + 64 + 100 + 144 = 366
M1
\dfrac{366}{5} - 8^2 = 73.2 - 64 = 9.2 A1AG
(d) \sigma = \sqrt{9.2}
A1
Note: Divide by n = 5 (population formula); award at most M1A1A0 in (b) for dividing by 4.

Final answer

  • (a) 8
  • (b) 9.2
  • (c) \frac{366}{5}-64=9.2
  • (d) \sqrt{9.2}

Question 4

[7 marks]
A village shop recorded the number of parcels left for collection on each of 11 days. The numbers, in order, are
12,\ 15,\ 17,\ 17,\ 18,\ 19,\ 20,\ 22,\ 22,\ 24,\ 41.
(a) Write down the median.
[1]
(b) Write down the lower quartile and the upper quartile.
[2]
(c) Find the interquartile range.
[1]
(d) Show that 41 is an outlier.
[2]
(e) Suggest a reason why 41 could be a genuine value rather than an error.
[1]
Show solutionHide solution
(a) 19 (the 6th value)
A1
(b) Q_1 = 17
A1
Q_3 = 22
A1
(c) 22 - 17 = 5
A1
(d) Q_3 + 1.5 \times \text{IQR} = 22 + 7.5
M1
= 29.5, and 41 > 29.5, so 41 is an outlier
A1AG
(e) e.g. a busy day before a public holiday, a sale at an online shop, or parcels held back from a day the shop was closed
R1
Note: the quartiles are the same whichever quartile method is used, because the values around the quartile positions are equal.

Final answer

  • (a) 19
  • (b) Q_1=17, Q_3=22
  • (c) 5
  • (d) 22+7.5=29.5<41
  • (e) e.g. a busy day before a holiday

Question 5

[6 marks]
A post office weighs the letters posted one morning. The lower quartile of the masses is 15 g. The upper boundary for outliers, Q_3 + 1.5 \times \text{IQR}, is 57.5 g.
(a) Find the upper quartile Q_3.
[3]
(b) The heaviest letter has a mass of 57.5 g. State whether it is an outlier. Give a reason.
[1]
(c) Find the lower boundary for outliers, and hence explain why none of the letters can be a low outlier.
[2]
Show solutionHide solution
(a) Q_3 + 1.5(Q_3 - 15) = 57.5
M1
2.5 Q_3 - 22.5 = 57.5 \Rightarrow 2.5 Q_3 = 80
A1
Q_3 = 32 g
A1
(b) not an outlier, because it is equal to the boundary, not more than 1.5 \times \text{IQR} above Q_3
R1
(c) 15 - 1.5 \times 17 = -10.5 g
A1
a mass cannot be negative (less than -10.5 g), so no letter can be a low outlier
R1
Note: FT from (a) in (c).

Final answer

  • (a) Q_3=32
  • (b) not an outlier: it equals the fence
  • (c) -10.5 g, and a mass cannot be negative

Question 6

[8 marks]
A technician records the age, x months, of eight laptops and the maximum charge their batteries can now hold, y, as a percentage of the original capacity.
Age, x (months)3691218243036
Capacity, y (%)9996979192848576
(a) Find the value of r.
[2]
(b) Describe the correlation between age and capacity.
[1]
(c) Find the equation of the regression line of y on x.
[2]
(d) Use your equation to estimate the capacity of a battery that is 20 months old.
[2]
(e) State whether your estimate in (d) is an interpolation or an extrapolation. Give a reason.
[1]
Show solutionHide solution
(a) r=-0.961\ (-0.960803\ldots)
A2
(b) strong negative correlation
A1
(c) y=-0.633x+101
A1A1
Note: award A1 for each correct coefficient; award A1A0 if the answer is not written as an equation.
(d) y=-0.633(20)+101 (M1)
=88.3% (88.2588\ldots)
A1
(e) interpolation, because 20 months lies within the range of the ages in the data (3 to 36 months)
R1

Final answer

  • (a) r=-0.961
  • (b) strong negative
  • (c) y=-0.633x+101
  • (d) 88.3\%
  • (e) interpolation: 20 lies inside 3 to 36 months

Question 7

[7 marks]
For a set of bivariate data the regression line of y on x is y = 1.2x + b and the regression line of x on y is x = 0.6y + 1. The mean of the y-values is 25. The values of x in the data lie between 8 and 24, and the values of y lie between 12 and 38.
(a) Find the mean of the x-values.
[2]
(b) Find the value of b.
[2]
(c) Estimate the value of x when y = 30.
[1]
(d) Estimate the value of y when x = 20, stating which line you use.
[2]
Show solutionHide solution
(a) the line of x on y passes through (\bar{x}, \bar{y}): \bar{x} = 0.6(25) + 1
M1
\bar{x} = 16
A1
(b) 25 = 1.2(16) + b
M1
b = 5.8
A1
(c) x = 0.6(30) + 1 = 19
A1
(d) y is being estimated, so use the line of y on x
R1
y = 1.2(20) + 5.8 = 29.8
A1
Note: FT their b from (b).

Final answer

  • (a) 16
  • (b) 5.8
  • (c) 19
  • (d) 29.8, from the line of y on x

Tutorial

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

Question 8

[6 marks]
A company has three offices, A, B and C. A stratified sample of 60 employees contains 18 from office A. Office A has 270 employees. Office B has twice as many employees as office C.
(a) Find the total number of employees in the company.
[2]
(b) Find the number of employees in office B and the number in office C.
[2]
(c) Find the number of employees from each of offices B and C in the sample.
[2]
Show solutionHide solution
(a) Sampling fraction = \dfrac{18}{270} = \dfrac{1}{15}.
[1]
Total employees = 60 \times 15 = 900.
[1]
(b) B and C together have 900 - 270 = 630 employees. With B = 2C: 3C = 630.
[1]
C = 210 and B = 420.
[1]
(c) Office B: 420 \times \frac{1}{15} = 28.
[1]
Office C: 210 \times \frac{1}{15} = 14 (check: 18 + 28 + 14 = 60).
[1]

Final answer

  • (a) 900
  • (b) B 420, C 210
  • (c) 28 and 14

Question 9

[6 marks]
The delays, in minutes, of 40 buses are recorded to the nearest 10 minutes. The unknown frequencies are p and q.
\text{Delay (}x\text{)}10203040
\text{Frequency}p12q6
The mean delay is 25 minutes.
(a) Write down an equation connecting p and q using the total frequency.
[1]
(b) Write down a second equation connecting p and q using the mean.
[2]
(c) Hence find p and q.
[2]
(d) Write down the modal delay.
[1]
Show solutionHide solution
(a) p + 12 + q + 6 = 40, so p + q = 22.
[1]
(b) \dfrac{10p + 240 + 30q + 240}{40} = 25.
[1]
10p + 30q = 520, i.e. p + 3q = 52.
[1]
(c) Subtracting: 2q = 30, so q = 15.
[1]
p = 22 - 15 = 7.
[1]
(d) The highest frequency is 15, so the modal delay is 30 minutes.
[1]

Final answer

  • (a) p+q=22
  • (b) p+3q=52
  • (c) p=7, q=15
  • (d) 30 minutes

Question 10

[7 marks]
Five numbers are 3,\ 5,\ 8,\ a,\ b, where a < b. Their mean is 6 and their variance is 3.6. You may use the result \sigma^2 = \dfrac{\sum x^2}{n} - \bar{x}^2.
(a) Show that a + b = 14.
[2]
(b) Show that a^2 + b^2 = 100.
[3]
(c) Hence find the value of a and the value of b.
[2]
Show solutionHide solution
; (a) \dfrac{3 + 5 + 8 + a + b}{5} = 6.
[1]
16 + a + b = 30.
[1]
a + b = 14.
AG
(b) 3.6 = \dfrac{\sum x^2}{5} - 6^2.
[1]
\sum x^2 = 9 + 25 + 64 + a^2 + b^2 = 98 + a^2 + b^2.
[1]
\dfrac{98 + a^2 + b^2}{5} = 39.6 \Rightarrow 98 + a^2 + b^2 = 198.
[1]
a^2 + b^2 = 100.
AG
(c) 2ab = (a + b)^2 - (a^2 + b^2) = 196 - 100 = 96, so ab = 48.
[1]
a, b are the roots of t^2 - 14t + 48 = (t - 6)(t - 8) = 0, so a = 6 and b = 8.
[1]

Final answer

(c) a=6, b=8

Question 11

[7 marks]
Eight numbers, in increasing order, are
3,\ 6,\ a,\ 11,\ b,\ 16,\ 19,\ 38,
where 6 \le a \le 11 and 11 \le b \le 16. The median is 12.5 and the interquartile range is 10.
(a) Find the value of b.
[2]
(b) Find the value of a.
[3]
(c) Show that 38 is an outlier.
[2]
Show solutionHide solution
(a) With eight values the median is the mean of the 4th and 5th: \dfrac{11 + b}{2} = 12.5.
[1]
b = 14.
[1]
(b) Q_3 is the mean of the 6th and 7th values: Q_3 = \dfrac{16 + 19}{2} = 17.5.
[1]
Q_1 = \dfrac{6 + a}{2} and Q_3 - Q_1 = 10, so Q_1 = 7.5.
[1]
6 + a = 15, so a = 9.
[1]
(c) Upper fence = Q_3 + 1.5\,\mathrm{IQR} = 17.5 + 1.5(10).
[1]
= 32.5.
[1]
38 > 32.5, so 38 is an outlier.
AG

Final answer

  • (a) b=14
  • (b) a=9
  • (c) 17.5+15=32.5<38

Question 12

[7 marks]
The table shows the times, in minutes, taken by 80 students to complete a quiz.
\text{Time }t20\text{--}3030\text{--}4040\text{--}5050\text{--}6060\text{--}7070\text{--}80
\text{Frequency}8122020146
(a) Write down the cumulative frequency for each class.
[1]
(b) Draw a cumulative frequency curve.
[2]
(c) Use your graph to estimate the median, the lower quartile and the upper quartile.
[2]
(d) Use your GDC to find an estimate of the mean and of the standard deviation of the times.
[2]
Show solutionHide solution
(a) 8,\ 20,\ 40,\ 60,\ 74,\ 80.
[1]
(b) Points (20,0), (30,8), (40,20), (50,40), (60,60), (70,74), (80,80) plotted at upper boundaries.
[1]
A smooth curve through the points.
[1]
(c) \frac{n}{4} = 20, \frac{n}{2} = 40, \frac{3n}{4} = 60: read across to the curve and down.
Q_1 = 40, median = 50.
[1]
Q_3 = 60.
[1]
(d) Mid-interval values 25, 35, 45, 55, 65, 75 with the frequencies; One-Variable Statistics.
[1]
Estimated mean = 49.75 minutes and estimated standard deviation \sigma_x = 13.96\ldots = 14.0 minutes.
[1]

Final answer

  • (a) 8,20,40,60,74,80
  • (c) Q_1=40, median 50, Q_3=60
  • (d) 49.75 and 14.0

Question 13

[6 marks]
A hiking club records the length of a trail, x km, and the time taken by a group, y minutes, on seven trails.
x\text{ (km)}3.25.06.48.19.511.212.8
y\text{ (min)}16232936394852
(a) Find the equation of the regression line of y on x.
[2]
The distances are converted to miles using x' = 0.6214x.
(b) Find the equation of the regression line of y on x'.
[2]
(c) Interpret the gradient of the line in part (b).
[1]
(d) Write down the value of r for the data in miles, without further calculation, giving a reason.
[1]
Show solutionHide solution
(a) Linear Regression: a = 3.79496\ldots,\ b = 4.24614\ldots
[1]
y = 3.79x + 4.25 (3 s.f.).
[1]
(b) Replace the x list by 0.6214x and run Linear Regression again (or y = a\bigl(\tfrac{x'}{0.6214}\bigr) + b).
[1]
y = 6.11x' + 4.25 (3 s.f.): the gradient is \dfrac{3.79496}{0.6214} = 6.1071\ldots and the intercept is unchanged.
[1]
(c) Each extra mile adds about 6.11 minutes to the hiking time.
[1]
(d) r = 0.997, unchanged: multiplying x by a positive constant does not change the strength or direction of the linear relationship.
[1]

Final answer

  • (a) y=3.79x+4.25
  • (b) y=6.11x'+4.25
  • (c) about 6.11 minutes for each extra mile
  • (d) r=0.997, unchanged by the scaling

Question 14

[6 marks]
The regression line of y on x is y = 0.5x + k and the regression line of x on y is x = 0.8y + 2. The mean of x is 18.
(a) Find the mean of y.
[2]
(b) Find the value of k.
[2]
(c) Use the appropriate line to estimate y when x = 30.
[1]
(d) Explain why the line x = 0.8y + 2 should not be used for the estimate in part (c).
[1]
Show solutionHide solution
(a) The mean point lies on x = 0.8y + 2: 18 = 0.8\bar{y} + 2.
[1]
\bar{y} = 20.
[1]
(b) The mean point also lies on y = 0.5x + k: 20 = 0.5(18) + k.
[1]
k = 11.
[1]
(c) y = 0.5(30) + 11 = 26.
[1]
(d) It is the line for predicting x from y; to predict y from a given x the y on x line must be used.
[1]

Final answer

  • (a) 20
  • (b) k=11
  • (c) 26
  • (d) it is the line for predicting x from y

Mastery

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

Question 15

[8 marks]
Seven integers a_1 \le a_2 \le \cdots \le a_7 have mean 6 and median 5. The smallest is 3, the largest is 11 and the upper quartile is 9. The mode is unique and equal to 4.
(a) Show that a_4 = 5 and a_6 = 9.
[2]
(b) Show that a_2 + a_3 + a_5 = 14.
[2]
(c) Find the seven integers. Show that your answer is the only one that is possible.
[4]
Show solutionHide solution
(a) With seven values the median is a_4, so a_4 = 5.
[1]
The upper half is a_5, a_6, a_7 and its median is a_6, so a_6 = 9.
[1]
(b) The sum is 7 \times 6 = 42.
[1]
3 + a_2 + a_3 + 5 + a_5 + 9 + 11 = 42.
[1]
a_2 + a_3 + a_5 = 14.
AG
(c) 3 \le a_2 \le a_3 \le 5 and 5 \le a_5 \le 9, so a_2 + a_3 \ge 6 and hence a_5 \le 8; also a_2 + a_3 \le 10 gives a_5 \ge 4, i.e. a_5 \in \{5, 6, 7, 8\}.
[1]
a_5 = 5: a_2 + a_3 = 9, (4, 5): set 3, 4, 5, 5, 5, 9, 11, mode 5 (rejected).
a_5 = 6: a_2 + a_3 = 8, (3, 5): modes 3 and 5 (rejected); (4, 4): set 3, 4, 4, 5, 6, 9, 11, unique mode 4.
[1]
a_5 = 7: a_2 + a_3 = 7, (3, 4): mode 3 (rejected). a_5 = 8: a_2 + a_3 = 6, (3, 3): mode 3 (rejected).
[1]
Only 3,\ 4,\ 4,\ 5,\ 6,\ 9,\ 11 satisfies all the conditions.
[1]

Final answer

(c) 3,4,4,5,6,9,11 (the only possibility)

Question 16

[7 marks]
Seven numbers in increasing order are 4,\ 6,\ 7,\ 9,\ 10,\ 12,\ x, where x is an integer and x \ge 12.
(a) Show that the lower quartile and the upper quartile do not depend on x.
[2]
(b) Find the greatest value of x for which x is not an outlier.
[2]
(c) Find all the values of x for which the mean of the seven numbers is greater than their median and x is not an outlier.
[3]
Show solutionHide solution
(a) The median is the 4th value, 9. Lower half 4, 6, 7: Q_1 = 6.
[1]
Upper half 10, 12, x with x \ge 12: Q_3 = 12, whatever the value of x.
[1]
(b) \mathrm{IQR} = 12 - 6 = 6, so the upper fence is 12 + 1.5(6) = 21.
[1]
The greatest value is x = 21 (not an outlier since 21 is not greater than 21).
[1]
(c) Mean = \dfrac{48 + x}{7} and median = 9: \dfrac{48 + x}{7} > 9.
[1]
x > 15.
[1]
With part (b): x = 16, 17, 18, 19, 20, 21.
[1]

Final answer

  • (a) Q_1=6, Q_3=12 for every x\ge12
  • (b) 21
  • (c) x=16,17,\dots,21

Question 17

[9 marks]
A volunteer watched a set of garden bird feeders for one minute each. The table shows the number of birds seen at a feeder, x, and the number of feeders, f. The frequencies p and q are unknown.
x01234
f6p11q3
The mean number of birds per feeder is 2 and the variance is \dfrac{7}{5}.
(a) Show that q - p = 6.
[2]
(b) Show that 9q - 11p = 40.
[3]
(c) Find p and q, and the number of feeders watched.
[3]
(d) Find the standard deviation of the number of birds per feeder.
[1]
Show solutionHide solution
(a) n = 20 + p + q and \sum fx = p + 22 + 3q + 12 = p + 3q + 34
M1
p + 3q + 34 = 2(20 + p + q) \Rightarrow q - p = 6 A1AG
(b) \sum fx^2 = p + 44 + 9q + 48 = p + 9q + 92
A1
\dfrac{p + 9q + 92}{20 + p + q} - 2^2 = \dfrac{7}{5}
M1
p + 9q + 92 = 5.4(20 + p + q) = 108 + 5.4p + 5.4q \Rightarrow 3.6q - 4.4p = 16 \Rightarrow 9q - 11p = 40 A1AG
(c) q = p + 6 \Rightarrow 9p + 54 - 11p = 40
M1
p = 7, q = 13
A1
n = 20 + 7 + 13 = 40 feeders
A1
(d) \sigma = \sqrt{7/5} = \dfrac{\sqrt{35}}{5} (\approx 1.18)
A1
Note: Both frequencies are positive integers, as counts must be.

Final answer

  • (c) p=7, q=13, 40 feeders
  • (d) \frac{\sqrt{35}}{5} (\approx1.18)

Question 18

[9 marks]
A class rolls a bicycle down the same ramp with its tyres at eight different pressures, p bar, and measures the distance, s metres, it then rolls along flat ground.
Pressure p (bar)2.02.53.03.54.04.55.05.5
Distance s (m)3037334235464050
The class wants to know which tyre pressure gives a rolling distance of 45 metres.
(a) Find the value of r and describe the correlation.
[2]
(b) Jana finds the regression line of s on p and rearranges it to make p the subject.
(i) Write down the equation of the regression line of s on p.
[1]
(ii) Find Jana's estimate of the pressure for a distance of 45 metres.
[2]
(c) Use the appropriate regression line to find a better estimate of the pressure.
[3]
(d) Explain why the two estimates are different.
[1]
Show solutionHide solution
(a) r = 0.810\ (0.810481\ldots)
A1
(fairly) strong positive correlation
A1
(b)(i) s = 4.45p + 22.4
A1
(ii) 45 = 4.45p + 22.4 \Rightarrow p = \dfrac{45 - 22.4}{4.45}
M1
p = 5.07 bar (5.06952\ldots)
A1
Note: accept 5.08 from the rounded line.
(c) the pressure is being estimated, so use the regression line of p on s
R1
p = 0.148s - 2.02
A1
p = 0.148(45) - 2.02 = 4.62 bar (4.61677\ldots)
A1
Note: accept 4.64 from the rounded line.
(d) the correlation is not perfect (r \ne 1), so the line of s on p and the line of p on s are different lines and give different predictions
R1

Final answer

  • (a) r=0.810, strong positive
  • (b)(i) s=4.45p+22.4
  • (ii) 5.07 bar
  • (c) p=0.148s-2.02, 4.62 bar
  • (d) r\ne\pm1, so the two lines differ

Question 19

[12 marks]
A small workshop makes wooden chairs. For eight weeks it records the number of chairs made, x, and the total cost, C euros, of running the workshop that week.
Chairs made, x812151820242730
Total cost, C (euros)14601750179020802090242024502700
(a) Find the equation of the regression line of C on x, in the form C=ax+b.
[2]
(b) Interpret, in context, (i) the value of a; (ii) the value of b.
[2]
(c) Find the value of r and describe the correlation.
[2]
Every chair made is sold for 120 euros.
(d) Use your model to find the least number of chairs the workshop must make and sell in a week to make a profit.
[3]
(e) The owner wants a weekly profit of at least 3000 euros.
(i) Use your model to find the least number of chairs needed.
[2]
(ii) Comment on the reliability of your answer to (e)(i).
[1]
Show solutionHide solution
(a) C=54.7x+1040
A1A1
Note: accept b=1039 (4 s.f.); the GDC gives b=1038.96\ldots.
(b)(i) each extra chair adds about 54.7 euros to the weekly cost
A1
(ii) the fixed weekly cost (rent, power) of about 1040 euros, paid even when no chairs are made
A1
(c) r=0.991\ (0.99068\ldots)
A1
strong positive correlation
A1
(d) profit when 120x>54.7x+1040
M1
x>15.918\ldots
A1
least number 16 chairs
A1
(e)(i) 120x-(54.7x+1040)\ge3000
M1
x\ge61.88\ldots, so at least 62 chairs
A1
(ii) 62 chairs is far outside the data (8 to 30 chairs a week), so this is extrapolation: costs may rise differently (overtime, more space), so the answer is unreliable
R1
Note: in (d) and (e) the answers must be whole numbers of chairs, rounded UP. FT from (a).

Final answer

  • (a) C=54.7x+1040
  • (b) about 54.7 euros per chair; fixed cost about 1040 euros a week
  • (c) r=0.991, strong positive
  • (d) 16
  • (e)(i) 62
  • (ii) extrapolation, so unreliable

Question 20

[7 marks]
Group A has 12 pairs (x, y) with mean point (10, 30) and group B has 8 pairs with mean point (20, 50). All 20 pairs are combined into one data set. The regression line of y on x for the combined data has gradient 2.3.
(a) Find the mean point of the combined data.
[3]
(b) Find the equation of the regression line of y on x for the combined data.
[2]
(c) Estimate y when x = 12 and give a reason why this estimate may be more reliable than an estimate at x = 40.
[2]
Show solutionHide solution
(a) \bar{x} = \dfrac{12(10) + 8(20)}{20}.
[1]
= \dfrac{120 + 160}{20} = 14.
[1]
\bar{y} = \dfrac{12(30) + 8(50)}{20} = \dfrac{360 + 400}{20} = 38.
[1]
(b) The line passes through (14, 38): y - 38 = 2.3(x - 14).
[1]
y = 2.3x + 5.8.
[1]
(c) y = 2.3(12) + 5.8 = 33.4.
[1]
x = 12 lies between the group means 10 and 20, close to \bar{x} = 14; x = 40 is far beyond both, an extrapolation.
[1]

Final answer

  • (a) (14,38)
  • (b) y=2.3x+5.8
  • (c) 33.4; 12 is between the group means, 40 is an extrapolation

Question 21

[16 marks]
A travel agency records the number of tickets, x, on each of 30 bookings.
\text{Tickets (}x\text{)}12345
\text{Frequency}47p5q
The mean number of tickets is 3.2.
(a) Find the value of p and the value of q.
[5]
(b) Find the median, the lower quartile and the upper quartile.
[4]
(c) Determine whether there are any outliers.
[2]
(d) ; Given that \sum fx^2 = 366, find the variance and the standard deviation. You may use \sigma^2 = \dfrac{\sum fx^2}{\sum f} - \bar{x}^2.
[3]
Each booking is rewritten as y = 5x - 1.
(e) Write down the mean and the standard deviation of y.
[2]
Show solutionHide solution
(a) Total frequency: 4 + 7 + p + 5 + q = 30, so p + q = 14.
[1]
\sum fx = 4 + 14 + 3p + 20 + 5q = 38 + 3p + 5q.
[1]
\dfrac{38 + 3p + 5q}{30} = 3.2 \Rightarrow 3p + 5q = 58.
[1]
Substituting p = 14 - q: 42 - 3q + 5q = 58.
[1]
q = 8 and p = 6.
[1]
(b) Cumulative frequencies: 4,\ 11,\ 17,\ 22,\ 30.
[1]
The 15th and 16th values are both 3, so the median is 3.
[1]
Lower half = first 15 values, median is the 8th value: Q_1 = 2. Upper half = last 15 values, median is the 23rd value overall: Q_3 = 5.
[2]
(c) \mathrm{IQR} = 5 - 2 = 3. Fences: 2 - 4.5 = -2.5 and 5 + 4.5 = 9.5.
[1]
All values lie between 1 and 5, so there are no outliers.
[1]
(d) ; \sigma^2 = \dfrac{366}{30} - 3.2^2 = 12.2 - 10.24.
[2]
\sigma^2 = 1.96 and \sigma = 1.4.
[1]
(e) Mean of y = 5(3.2) - 1 = 15.
[1]
Standard deviation of y = 5 \times 1.4 = 7.
[1]

Final answer

  • (a) p=6, q=8
  • (b) median 3, Q_1=2, Q_3=5
  • (c) fences -2.5 and 9.5: no outliers
  • (d) \sigma^2=1.96, \sigma=1.4
  • (e) mean 15, \sigma=7

Question 22

[15 marks]
The finishing times, t minutes, of 100 runners in a marathon are summarised below.
\text{Time }t180\text{--}210210\text{--}240240\text{--}270270\text{--}300300\text{--}330330\text{--}360
\text{Frequency}6183226126
(a) Find an estimate of the mean finishing time and of the standard deviation.
[3]
(b) Complete a cumulative frequency table and draw a cumulative frequency curve.
[3]
(c) Use your graph to estimate the median and the interquartile range.
[3]
(d) Find the number of runners who took more than 330 minutes.
[1]
(e) Using your estimates from part (c), show that a time of 350 minutes would not be classified as an outlier.
[2]
The times are converted to hours using h = \dfrac{t}{60}.
(f) Find an estimate of the mean and of the standard deviation of the times in hours.
[2]
The organisers interview the first 30 runners to cross the finish line about the water stations.
(g) Identify the sampling method and state one group of runners it leaves out.
[1]
Show solutionHide solution
(a) Mid-interval values 195, 225, 255, 285, 315, 345 with the frequencies; One-Variable Statistics.
[1]
Estimated mean = 266.4 minutes.
[1]
Estimated standard deviation \sigma_x = 37.417\ldots = 37.4 minutes.
[1]
(b) Cumulative frequencies at 210, 240, \ldots, 360: 6, 24, 56, 82, 94, 100.
[1]
Points (180, 0), (210, 6), \ldots, (360, 100) plotted at the upper boundaries and joined by a smooth curve.
[2]
(c) Read across at 25, 50 and 75: Q_1 \approx 241, median \approx 264 (accept 262 to 266), Q_3 \approx 290.
[2]
\mathrm{IQR} \approx 290 - 241 \approx 49 minutes (accept 45 to 53).
[1]
(d) At 330 minutes the cumulative frequency is 94, so 100 - 94 = 6 runners.
[1]
(e) Upper fence \approx Q_3 + 1.5\,\mathrm{IQR} \approx 290 + 1.5(49) \approx 363.
[1]
350 < 363, so a time of 350 minutes is not an outlier.
[1]
(f) Dividing by 60: mean = \dfrac{266.4}{60} = 4.44 hours.
[1]
Standard deviation = \dfrac{37.417}{60} = 0.624 hours.
[1]
(g) Convenience sample: the first runners to finish are the fastest, so the slower runners cannot be chosen; a random or stratified sample would include them.
[1]

Final answer

  • (a) 266.4 and 37.4
  • (b) 6,24,56,82,94,100
  • (c) median about 264, IQR about 49
  • (d) 6
  • (e) 290+73.5\approx363>350
  • (f) 4.44 h and 0.624 h
  • (g) convenience sample; the slower runners cannot be chosen

Going further

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

G1 Which centre is best?

G1 Worked example

[9 marks]
Four villages lie on a straight road at 0, 3, 5 and 12 km from a junction. The numbers of commuters who live in them are 40, 25, 20 and 15. A bus stop is to be placed on the road, t km from the junction.
(a) Show that the sum of the squared distances from the 100 commuters' homes to the stop is T(t)=100t^2-710t+2885.
[2]
(b) Find the value of t that minimises T(t). Show that the least value of T is 100\sigma^2, where \sigma is the standard deviation of the commuters' distances from the junction.
[3]
(c) The total distance walked is D(t)=\sum f\,|x-t|. Find the value of t that minimises D(t), and this least total.
[3]
(d) Another 15 commuters move into the village at 12 km. State, with a reason, which of the two best positions moves.
[1]
Show solutionHide solution
(a) T(t)=\sum f(x-t)^2=t^2\sum f-2t\sum fx+\sum fx^2
M1
\sum f=100, \sum fx=75+100+180=355, \sum fx^2=225+500+2160=2885, so T(t)=100t^2-710t+2885
A1AG
(b) vertex at t=\dfrac{710}{200}=3.55, which is the mean \bar x
A1
T(3.55)=2885-100\times3.55^2=1624.75
A1
\sigma^2=\dfrac{2885}{100}-3.55^2=16.2475, and 100\sigma^2=1624.75
A1
(c) moving the stop a small distance to the right adds that distance for every commuter to its left and saves it for every commuter to its right; for 0<t<3 the gradient of D is 40-60=-20, for 3<t<5 it is 65-35=30
M1
so D is least at t=3, the median village
A1
D(3)=40\times3+0+20\times2+15\times9=295 (km)
A1
(d) the median stays at 3 km (now 115 commuters, and the 58th lives at 3 km) but the mean moves to \frac{535}{115}=4.65 km: only the position from (b) moves
R1

Final answer

  • (b) t=3.55, least value 1624.75
  • (c) t=3, 295 km
  • (d) the mean moves, the median does not

G1 Investigation

[12 marks]
For data x_1<x_2<\cdots<x_n and a number t, let S(t)=\sum(x_i-t)^2, D(t)=\sum|x_i-t| and M(t) be the largest of the distances |x_i-t|.
(a) For the data 1,2,4,10, find the least value of S(t). Show that D(t)=11 for every t with 2\le t\le4.
[3]
(b) Explain why, when t lies strictly between two neighbouring data values, the gradient of D is (the number of data values below t) - (the number above t).
[2]
(c) Hence show that D(t) is least at the median when n is odd, and at every t between the two middle values when n is even.
[3]
(d) The value 100 is added to the data in (a). Find the new value of t that minimises S, and the new value of t that minimises D. Comment on your answers.
[2]
(e) Show that M(t) is least when t=\frac12(x_1+x_n), the mid-range.
[2]
Show solutionHide solution
(a) \bar x=4.25, and the least value is \sum x^2-n\bar x^2=121-4\times4.25^2=48.75
M1A1
for 2\le t\le4: D(t)=(t-1)+(t-2)+(4-t)+(10-t)=11
A1AG
(b) on such an interval each term |x_i-t| is t-x_i (gradient +1) when x_i<t and x_i-t (gradient -1) when x_i>t
M1
adding, the gradient is (\text{number below})-(\text{number above})
A1AG
(c) D is continuous and piecewise linear; its gradient goes up by 2 each time t passes a data value, from -n (left of all data) to +n (right of all data)
M1
n=2k+1: the gradient is -1 just left of x_{k+1} and +1 just right of it, so D is least at x_{k+1}, the median
A1
n=2k: the gradient is 0 for x_k<t<x_{k+1}, negative before and positive after, so D is least at every t in [x_k,x_{k+1}]
A1
(d) S is least at the mean, \frac{117}{5}=23.4; D is least at the median, 4
A1
one large value drags the mean (and the minimiser of S) a long way; the median, and so the minimiser of D, hardly moves
R1
(e) M(t) is the larger of t-x_1 (increasing) and x_n-t (decreasing)
M1
the larger of the two is least where they are equal, t=\frac12(x_1+x_n), giving M=\frac12(x_n-x_1)
A1

Final answer

  • (a) 48.75
  • (d) 23.4 and 4
  • (e) proof

G2 Where the regression line comes from

G2 Worked example

[8 marks]
For data points (x_i,y_i), the line y=ax+b is chosen to make E=\sum(y_i-ax_i-b)^2 as small as possible. Write S_{xx}=\sum(x_i-\bar x)^2, S_{xy}=\sum(x_i-\bar x)(y_i-\bar y) and S_{yy}=\sum(y_i-\bar y)^2. The data are (1,2), (2,3), (3,5), (4,6).
(a) Explain why, for a fixed a, E is least when b=\bar y-a\bar x.
[2]
(b) Find S_{xx}, S_{xy} and S_{yy}. Show that, with b=\bar y-a\bar x, E=5a^2-14a+10.
[3]
(c) Find the values of a and b that minimise E, and the least value of E.
[2]
(d) Compare your line with the regression line of y on x from your GDC.
[1]
Show solutionHide solution
(a) for fixed a, E=\sum\bigl((y_i-ax_i)-b\bigr)^2 is a sum of squared distances from b to the numbers y_i-ax_i
M1
that sum is least when b is their mean, \bar y-a\bar x
R1
(b) \bar x=2.5, \bar y=4; S_{xx}=5, S_{xy}=3+0.5+0.5+3=7, S_{yy}=10
A1
with b=\bar y-a\bar x, each bracket is (y_i-\bar y)-a(x_i-\bar x), so E=S_{yy}-2aS_{xy}+a^2S_{xx}
M1
E=10-14a+5a^2
A1AG
(c) vertex at a=\dfrac{14}{10}=1.4; b=4-1.4\times2.5=0.5
A1
least E=10-14(1.4)+5(1.4)^2=0.2
A1
(d) the GDC gives y=1.4x+0.5: the same line
A1

Final answer

  • (b) S_{xx}=5, S_{xy}=7, S_{yy}=10
  • (c) a=1.4, b=0.5, E=0.2

G2 Investigation

[11 marks]
Use the notation of Worked example G2.
(a) For the data (0,1), (1,1), (2,4), (3,4), (4,5), find S_{xx}, S_{xy} and S_{yy}, and the regression line of y on x from a=\dfrac{S_{xy}}{S_{xx}}. Check it with your GDC.
[2]
(b) The regression line of x on y makes the sum of the squared horizontal distances as small as possible. Explain why it is x-\bar x=\dfrac{S_{xy}}{S_{yy}}(y-\bar y), and find it for these data.
[2]
(c) Show that the least value of E is S_{yy}-\dfrac{S_{xy}^2}{S_{xx}}. Deduce that S_{xy}^2\le S_{xx}S_{yy}, with equality only when all the points lie on one straight line.
[3]
(d) Your GDC computes r=\dfrac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}. Show that -1\le r\le1.
[1]
(e) Assume S_{xy}\ne0. Write the line in (b) as y=mx+k, and show that \dfrac{a}{m}=r^2. Deduce that the two regression lines are the same line only when r=\pm1.
[3]
Show solutionHide solution
(a) \bar x=2, \bar y=3; S_{xx}=10, S_{xy}=11, S_{yy}=14
A1
a=1.1, b=3-2.2=0.8: y=1.1x+0.8, as the GDC gives
A1
(b) swap the roles of x and y in Worked example G2: the line passes through (\bar x,\bar y) with \dfrac{\mathrm dx}{\mathrm dy}=\dfrac{S_{xy}}{S_{yy}}
R1
x-2=\dfrac{11}{14}(y-3), that is x=0.786y-0.357 (3 s.f.)
A1
(c) E=S_{xx}a^2-2S_{xy}a+S_{yy} is least at a=\dfrac{S_{xy}}{S_{xx}}, with value S_{yy}-\dfrac{S_{xy}^2}{S_{xx}}
M1A1
E is a sum of squares, so this is \ge0, giving S_{xy}^2\le S_{xx}S_{yy}; it is 0 only if every y_i=ax_i+b, that is, all the points lie on the line
R1
(d) r^2=\dfrac{S_{xy}^2}{S_{xx}S_{yy}}\le1 by (c), so -1\le r\le1
A1
(e) y-\bar y=\dfrac{S_{yy}}{S_{xy}}(x-\bar x), so m=\dfrac{S_{yy}}{S_{xy}}
A1
\dfrac am=\dfrac{S_{xy}}{S_{xx}}\cdot\dfrac{S_{xy}}{S_{yy}}=r^2
A1
both lines pass through (\bar x,\bar y), so they are the same line exactly when a=m, that is r^2=1. Here m=\frac{14}{11}=1.27, steeper than a=1.1, and r^2=\frac{121}{140}=0.864
R1

Final answer

  • (a) y=1.1x+0.8
  • (b) x-2=\frac{11}{14}(y-3)
  • (e) \frac{a}{m}=r^2=\frac{121}{140}

TI-84 Plus CE keystrokes

The GDC panels in the book give keystrokes for the TI-Nspire CX II and the Casio fx-CG50. The TI-84 Plus CE keystrokes for the common calculator jobs are listed in Chapter 19.

From the book

The Ultimate Guide for the IB: Mathematics: Analysis and Approaches HL

Chapter 12 teaches statistics 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