IB Mathematics: Analysis & Approaches IB

Lesson 16: Descriptive Statistics and Regression

🎧 Listen to this lesson

Statistics begins by *describing* data honestly before any inference is attempted (AA Topic 4). The IB toolkit: measures of centre (mean, median, mode), measures of spread (range, interquartile range, variance and standard deviation), outlier detection, representations (box plots, cumulative frequency curves), and the first steps of bivariate analysis — correlation and linear regression. The examined skill is rarely the arithmetic (the GDC does it) but the *choice*: which summary suits this data, and what may legitimately be concluded.

Centre and spread

The mean x̄ = Σx/n uses every value and is dragged by outliers; the median (middle value) resists them; the mode suits categorical or peaked data. Spread: range is crude; the interquartile range IQR = Q3 − Q1 captures the middle 50%; standard deviation σ measures typical distance from the mean, with variance σ² = Σ(x − x̄)²/n. An outlier is a value more than 1.5 × IQR below Q1 or above Q3 — a definition, not a vibe, and IB tests it as such. GDC caution: 1-Var Stats reports both Sx (sample, ÷(n − 1)) and σx (population, ÷n); unless a question says "sample", IB data sets are whole populations — use σx. This single button choice is a documented mark-loser.

Worked Example 1 — summaries and an outlier (past-paper style). Test scores: 42, 55, 58, 61, 63, 67, 70, 72, 75, 97. Find the mean, median, quartiles, IQR, and any outliers.

Solution. Mean = 660/10 = 66. Median (average of 5th and 6th values) = (63 + 67)/2 = 65. Lower half median Q1 = 58; upper half median Q3 = 72; IQR = 14. Outlier fences: Q3 + 1.5 × 14 = 93 and Q1 − 21 = 37. The score 97 exceeds 93 — it is an outlier; 42 is not. Note the effect: with 97 included the mean (66) sits above the median (65) — one extreme value pulls the mean; report both when the data is skewed, and say why.

Grouped data and cumulative frequency

For data in classes, the mean is estimated using midpoints (Σfx/Σf), and no exact median exists — estimate it from the cumulative frequency curve (ogive): plot cumulative frequency against upper class bounds, read the median at n/2, quartiles at n/4 and 3n/4. Estimates are the point: markschemes accept a sensible range read from a well-drawn curve, so draw it big, with a ruler, and show the reading lines.

Worked Example 2 — reading a cumulative frequency curve. 80 students' times (minutes) to complete a puzzle are grouped; the ogive passes through (10, 6), (15, 22), (20, 45), (25, 64), (30, 76), (35, 80). Estimate the median and IQR.

Solution. Median at cumulative frequency 40: ≈ 19 minutes. Q1 at cf = 20: ≈ 14.5 minutes; Q3 at cf = 60: ≈ 24 minutes. IQR ≈ 9.5 minutes. The three readings use the same horizontal-then-vertical manoeuvre; state each estimate with "approximately" and move on — this question type is a gift of routine marks to candidates who practise the reading motion.

Correlation and regression

A scatter diagram suggests association; Pearson's product-moment correlation coefficient r measures linear strength and direction: r near ±1 is strong, near 0 is no *linear* association (curves can hide in r ≈ 0 data). The least squares regression line of y on x passes through (x̄, ȳ) always, with gradient from the GDC or the booklet formula. Use it to predict y from x inside the data range (interpolation, defensible) rather than far outside (extrapolation, where the model is unproven — examiners require this caution in words). And the mantra: correlation is not causation — a third variable (summer) drives both ice-cream sales and drownings.

Worked Example 3 — regression with judgement. For 8 students, hours of revision x versus test score y gave x̄ = 5.5, ȳ = 68, r = 0.86, and regression line y = 6.2x + 33.9. (a) Predict the score for 7 hours. (b) Comment on predicting for 20 hours. (c) A ninth student revised 5.5 hours and scored 68 — why is that no coincidence?

Solution. (a) y = 6.2(7) + 33.9 = 77.3 ≈ 77. (b) 20 hours is far outside the data range (extrapolation): the line would give 158, exceeding the test's maximum — the linear model cannot hold; the prediction is not valid. (c) (5.5, 68) is (x̄, ȳ), and the regression line always passes through the mean point — a free check on any regression computation. r = 0.86 indicates a strong positive linear association, but the correct conclusion wording is association, not "revision causes marks" — motivation could drive both.

Common mistakes

  • Sx instead of σx on the GDC (see above) — check which your question wants.
  • Outliers judged by eye instead of the 1.5 × IQR fences, or fences computed from the range.
  • Median of an even data set reported as one of the middle values instead of their mean.
  • Regression line used in reverse (predicting x from y with the y-on-x line) — that needs its own regression; IB penalises the swap.
  • Extrapolation reported without comment, or causation language ("as x increases, y increases *because*…") from correlational data.
  • Grouped mean without midpoints, or modal class confused with the mode of raw data.
Key idea. Summaries are arguments: mean with σ for symmetric data, median with IQR when outliers or skew dominate. Choose deliberately, compute by GDC, and spend your words on interpretation — that is where the marks live.

IB Exam Experience

Question 1 [2 marks]. Data: 3, 5, 5, 7, 9, 11, 30. Find the mean and median, and state which better represents the data, with a reason. *Marking notes:* A1: mean = 70/7 = 10, median = 7; A1: median — the outlier 30 inflates the mean above six of the seven values.

Question 2 [3 marks]. A data set has Q1 = 22, Q3 = 38. A value of 63 is recorded. Determine whether it is an outlier. *Marking notes:* M1: IQR = 16, upper fence = 38 + 1.5 × 16 = 62; A1: 63 > 62; A1: conclusion — yes, it is an outlier (by a single unit: boundary discipline is the test).

Question 3 [4 marks]. For paired data, x̄ = 12, ȳ = 30, and the regression line of y on x is y = 1.5x + c. (a) Find c. [2] (b) Given r = 0.92, describe the association. [1] (c) Predict y when x = 14 and comment on reliability if the data range of x was 4 to 30. [1] *Marking notes:* (a) M1: the line passes through (x̄, ȳ): 30 = 18 + c; A1: c = 12. (b) A1: strong positive linear association. (c) A1: y = 33, interpolation within the range — reasonably reliable.

Extended problem (Paper 2 style) [10 marks]. Two classes sat the same test. Class A (n = 24): mean 62, σ = 8. Class B (n = 24): mean 58, σ = 15, median 61. (a) Which class performed better on average, and which was more consistent? Justify both. [4] (b) A student says "Class B is worse in every way." Challenge this using the median. [2] (c) The school claims the classes are "about the same". Write two sentences for the school report that are accurate and fair to both classes. [2] (d) One Class B script, originally marked 12, is re-marked to 92. State, with reasons, the effect on Class B's mean and median. [2] *Marking notes:* (a) A1: Class A higher mean (62 > 58); A1: Class A more consistent (smaller σ); M1 A1 for connecting "consistent" explicitly to spread, not centre. (b) M1: B's median (61) exceeds its mean — B's distribution is left-skewed by low outliers; A1: half of Class B scored above 61, comparable to A — "worse in every way" is false. (c) A2 for accurate wording: e.g. "Class A achieved a higher average with more consistent results; Class B's typical (median) student performed similarly to Class A's, but B's results were more variable." (d) A1: the mean rises noticeably (one value +80 spread over 24 students ≈ +3.3); A1: the median barely moves (it depends on middle order statistics) — the canonical mean-fragility/median-robustness demonstration.

Exploration (IA) idea: compare two real distributions with a decision at stake (bus route reliability, sprint times across eras, prices across supermarkets) — descriptive statistics with a genuine question, box plots, and outlier discussion is a solid SL IA spine (HL candidates should add a modelling or inferential layer).

Try it. A data set of 9 numbers has mean 20 and median 18. The largest number, 47, is removed. What happens to the mean and the median? (New mean = (180 − 47)/8 = 16.625 — falls a lot; the median of the remaining 8 values shifts from the 5th value to the average of the 4th and 5th — moves little. Mean fragile, median robust.)

Going deeper: reading box plots comparatively, and r²

A box plot compresses five numbers (min, Q1, median, Q3, max, with outliers plotted separately) into a comparison device: position of the box shows centre, its length shows IQR, the whiskers show range, and asymmetry inside the box shows skew. Comparing two plots in words — centre, spread, skew, outliers, in context — is a complete Section A answer template. Also meet r², the coefficient of determination: the proportion of the variation in y "explained" by the linear model — r = 0.86 means r² ≈ 0.74, about 74% of the variance accounted for; it is the number regression software reports and the one worth quoting in IAs.

Extra worked example. Class P's box plot: min 41, Q1 55, median 63, Q3 74, max 88. Class Q's: min 30, Q1 50, median 64, Q3 70, max 95, with 30 flagged as the only outlier. Compare the classes in four sentences.

Solution. Centres are nearly identical (medians 63 vs 64), so typical attainment is the same. Class P is more consistent in the middle 50% (IQR 19 vs 20 — comparable), but Class Q's overall range is wider (65 vs 47) driven by both a very high maximum and an outlying low score. Class Q's box is left-skewed (median close to Q3), suggesting a cluster of strong results with a tail of strugglers; Class P is roughly symmetric. A fair summary: same typical performance; Q is more polarised. Four sentences, four features — centre, spread, skew, outliers — each tied to numbers.

Extra exam practice [3 marks]. A regression gives r = −0.45 between hours of TV per week and test score. (a) Interpret r. [1] (b) Compute and interpret r². [1] (c) State why "TV lowers scores" is not yet justified. [1] *Marking notes:* (a) moderate negative linear association. (b) r² ≈ 0.20 — about 20% of the variation in scores is associated with TV hours; 80% lies elsewhere. (c) correlation is not causation: confounders (sleep, study time, socioeconomic factors) may drive both; only a controlled study could support the causal claim.

📊 Interactive: Scatter and Trend

Interactive — hover or explore the chart above.

Keep reading to complete this lesson