Skip to content

4 · Statistics and probability

IB Mathematics: Applications and Interpretation SLTopic 4

Video lesson for this topic Open the video page
4:23

Statistics and probability

These are selected topics, not the whole syllabus, and every example is fictional. Compare an average and a spread, and remember a histogram shows frequency as…

English narration · English + 中文 subtitles burned in

4.1

Scope and prerequisites

This handout teaches topic 4, Statistics and probability, of Mathematics: Applications and Interpretation, the course first assessed in 2021: sampling, presenting and summarising data, correlation and regression, Spearman's rank correlation, probability, discrete random variables, the binomial and normal distributions, and hypothesis testing with the chi-squared and t-tests, and, for HL, reliability and validity, non-linear regression, linear combinations of random variables, the central limit theorem, confidence intervals, the Poisson distribution, critical regions and errors, and Markov chains.

Prerequisites: fractions, decimals and percentages, substitution into formulae, and matrices (topic 1) for the HL Markov chains.

4.2

Sampling and data

The lady tasting tea

In the 1920s, at an agricultural research station north of London, the biologist Muriel Bristol said she could taste whether the milk or the tea had been poured into a cup first. The statistician Ronald Fisher designed a test: eight cups, four of each kind, in a random order. If she were only guessing, the chance of picking the right four is $\frac{1}{70} \approx 0.014$, so a perfect score would be strong evidence that she was not guessing. According to one of those present, she identified them all. Fisher used the story to open his book on the design of experiments in 1935. Every hypothesis test in this topic asks his question: could the result have happened by chance alone?

A large crowd of people
A crowd is a population: a well-chosen sample tells you about it without asking everyone
Eight cups, four milk-first and four tea-first in random order; guessing the right four has probability 1 in 70, about 0.014
Fisher's eight cups

Populations and samples

  • The population 总体 is every member of the group being studied; a sample 样本 is the part actually measured.
  • A sample is biased when some members of the population are more likely to be included, so the sample does not represent the population.
  • Discrete data 离散数据 can take only separate values (number of siblings); continuous data 连续数据 can take any value in a range (height, time).

Sampling techniques

Technique How Strength Weakness
Simple random Every member equally likely, such as random numbers No selection bias Needs a full list
Systematic Every $k$th member from a list Quick, spread out Biased if the list has a pattern
Stratified Random samples from each group in proportion Represents every group Needs group sizes
Quota Fixed numbers from each group, not random Quick, cheap Interviewer chooses: bias
Convenience Whoever is easy to reach Easiest Rarely representative
Four random sampling designs: who gets selected, and how
Four random sampling designs: who gets selected, and how

Worked example. A school has 300 students in Year 10 and 200 in Year 11. A stratified sample of 50 takes $\frac{300}{500} \times 50 = 30$ from Year 10 and 20 from Year 11.

An outlier 异常值 is a value far from the rest: more than $1.5 \times \text{IQR}$ below $Q_1$ or above $Q_3$. Check an outlier before removing it: a recording error can be corrected, but a genuine extreme value is part of the data.

Vocabulary Train
English
population/ˌpɒpjʊˈleɪʃn/
sample/ˈsæmpl/
discrete data/dɪˈskriːt ˈdeɪtə/
continuous data/kənˈtɪnjuːəs ˈdeɪtə/
outlier/ˈaʊtlaɪə/
4.3

Summarising data

Measures of centre and spread

For the data $3, 5, 7, 7, 8, 10, 12, 20$ ($n = 8$):

Data 2, 3, 3, 5, 7: mean = 4, median = 3, mode = 3, range = 5
Mean, median, mode and range of a small data set
  • mean 平均数 $\bar{x} = \dfrac{\sum x}{n} = \dfrac{72}{8} = 9$;
  • median 中位数 $= \dfrac{7 + 8}{2} = 7.5$, the middle value of the ordered data;
  • mode 众数 $= 7$, the most frequent value;
  • quartiles 四分位数 $Q_1 = 6$ and $Q_3 = 11$, so the interquartile range 四分位距 is $\text{IQR} = 5$. Since $11 + 1.5 \times 5 = 18.5$, the value 20 is an outlier;
  • standard deviation 标准差 $\sigma \approx 4.90$, from the GDC.

The median and IQR resist outliers; the mean and standard deviation are pulled by them. If every value is multiplied by $a$ and then $b$ is added, the mean and median become $a(\cdot) + b$, while the standard deviation and IQR are multiplied by $|a|$ and not changed by $b$. For $a \ge 0$, quartiles also become $a(\cdot) + b$; for $a < 0$, their order reverses, so the new $Q_1$ is $aQ_3+b$ and the new $Q_3$ is $aQ_1+b$.

For grouped data, use the mid-interval values: $\bar{x} \approx \dfrac{\sum fx}{\sum f}$. The result is an estimate because the exact data are not known.

Cumulative frequency and box plots

A cumulative frequency 累积频率 graph plots the running total against the upper class boundary. Reading across at $\frac{n}{4}$, $\frac{n}{2}$ and $\frac{3n}{4}$ gives estimates of $Q_1$, the median and $Q_3$. A box plot 箱线图 shows the minimum, $Q_1$, median, $Q_3$ and maximum, with outliers marked separately.

Cumulative frequency curve for 80 students' times with Q1 25, median 32 and Q3 40 minutes read off; below it a box plot from 12 to 58 minutes with an outlier at 70
Quartiles from a cumulative frequency curve, and the matching box plot

For the 80 students, the upper fence is $40 + 1.5 \times 15 = 62.5$ minutes, so the 70-minute time is an outlier and the whisker stops at the largest value inside the fence, 58 minutes. When comparing two box plots, compare a measure of centre (median) and a measure of spread (IQR) in context.

Vocabulary Train
English
mean/miːn/
median/ˈmiːdiːən/
mode/məʊd/
quartile/ˈkwɔːtaɪl/
interquartile range/ˌɪntəˈkwɔːtaɪl reɪndʒ/
standard deviation/ˈstændəd ˌdiːvɪˈeɪʃn/
cumulative frequency/ˈkjuːmjʊlətɪv ˈfriːkwənsi/
box plot/bɒks plɒt/
4.4

Correlation and regression

Pearson's correlation coefficient

A scatter diagram 散点图 shows paired data $(x, y)$. Pearson's product-moment correlation coefficient $r$, found with technology, measures the strength of the linear relationship: $-1 \le r \le 1$. A common guide to describing it:

$\lvert r\rvert$ Strength of linear correlation
$0 < \lvert r\rvert \le 0.25$ very weak
$0.25 < \lvert r\rvert \le 0.5$ weak
$0.5 < \lvert r\rvert \le 0.75$ moderate
$0.75 < \lvert r\rvert \le 1$ strong

Correlation is not causation: ice-cream sales and drownings both rise in hot weather, because a third variable, temperature, drives both.

The regression line

The regression line 回归直线 of $y$ on $x$, found with technology, minimises the squared vertical distances and passes through the mean point $(\bar{x}, \bar{y})$.

Scatter diagram of hours of revision against score for 12 students, with regression line y = 39.3 + 4.87x through the mean point (4.75, 62.4), r = 0.974
Regression line of y on x through the mean point

Worked example. For 12 students, hours of revision $x$ and score $y$ give $r = 0.974$ and $y = 39.3 + 4.87x$.

  • Prediction for 5.5 hours: $y = 39.3 + 4.87 \times 5.5 \approx 66$. Reliable: $r$ is strong and 5.5 is within the data (interpolation 内插).
  • The gradient means each extra hour of revision is associated with about 4.9 more marks.
  • A prediction for 15 hours gives 112, more than the maximum mark: extrapolation 外推 is unreliable.
  • Use this line only to predict $y$ from $x$.

Spearman's rank correlation

Spearman's rank correlation coefficient 斯皮尔曼等级相关系数 $r_s$ is Pearson's $r$ applied to the ranks of the data. It measures how well the relationship is monotonic: whether $y$ always increases (or always decreases) as $x$ increases, even if not in a straight line. Equal values share the mean of their ranks.

Ranks in maths 1 to 6 against physics ranks 2, 1, 4, 3, 6, 5 lie close to the diagonal: r s about 0.829
Two rankings in strong agreement

Worked example. Six students are ranked in mathematics (1 to 6) and in physics as 2, 1, 4, 3, 6, 5. Pearson's $r$ on the ranks, by GDC, gives $r_s \approx 0.829$: a strong positive agreement between the two rankings.

Use $r_s$ when the data are ranks, when there are outliers, or when the pattern is a curve that keeps rising. For data that rise and then fall, neither coefficient describes the relationship.

Vocabulary Train
English
scatter diagram/ˈskætə ˈdaɪəɡræm/
regression line/rɪˈɡreʃn laɪn/
interpolation/ɪnˌtɜːpəˈleɪʃn/
extrapolation/ekˈstræpəleɪʃn/
Spearman's rank correlation coefficient/ˈspɪəmənz ræŋk ˌkɒrɪˈleɪʃn ˌkəʊɪˈfɪʃənt/
4.5

Probability

Events and Venn diagrams

For equally likely outcomes, the probability 概率 of event $A$ is $P(A) = \dfrac{n(A)}{n(U)}$, where $U$ is the sample space 样本空间. $P(A') = 1 - P(A)$, and the expected number of times $A$ happens in $n$ trials is $nP(A)$.

Two ordinary six-sided dice, one cream and one red
Fair dice: each face is equally likely, the simplest probability model
$$P(A \cup B) = P(A) + P(B) - P(A \cap B)$$

Mutually exclusive 互斥 events cannot both happen: $P(A \cap B) = 0$.

Venn diagram of a class of 30: 13 play football only, 5 both, 7 basketball only and 5 neither
Fill a Venn diagram from the overlap outwards

Worked example. In a class of 30, 18 play football ($F$), 12 basketball ($B$) and 5 both. Then $F$ only $= 13$, $B$ only $= 7$, neither $= 5$, and $P(F \cup B) = \frac{25}{30} = \frac{5}{6}$.

Conditional probability and independence

$$P(A \mid B) = \frac{P(A \cap B)}{P(B)}$$

Given that a student plays basketball, the chance they also play football is $P(F \mid B) = \frac{5}{12}$: the sample space shrinks to the 12 basketball players.

Events are independent 独立 if $P(A \cap B) = P(A)P(B)$. Here $0.6 \times 0.4 = 0.24 \ne \frac{5}{30}$, so the two sports are not independent.

Worked example. Two counters are taken without replacement from a bag of 3 red and 2 blue. A tree diagram 树状图 gives $P(RR) = \frac{3}{5} \times \frac{2}{4} = 0.3$ and $P(BB) = \frac{2}{5} \times \frac{1}{4} = 0.1$, so $P(\text{same colour}) = 0.4$. Multiply along branches, add between them.

Vocabulary Train
English
probability/ˌprɒbəˈbɪlɪti/
sample space/ˈsæmpl speɪs/
mutually exclusive/ˈmjuːtʃuːəli eksˈkluːsɪv/
independent/ˌɪndɪˈpendənt/
tree diagram/triː ˈdaɪəɡræm/
4.6

Discrete random variables and the binomial distribution

Expected value

A discrete random variable 离散随机变量 $X$ takes separate values with probabilities that add to 1. Its expected value 期望值 is $E(X) = \sum x\,P(X = x)$.

Worked example. A game costs ¥3. The prize is ¥0, ¥2 or ¥10 with probabilities 0.5, 0.3 and 0.2. $E(X) = 0 + 0.6 + 2 = 2.6$, so the expected gain is $-0.4$ yuan per game. A game is fair if the expected gain is 0.

The binomial distribution

$X \sim B(n, p)$ counts the successes in $n$ independent trials, each with the same probability of success $p$. $E(X) = np$ and $\text{Var}(X) = np(1 - p)$. Use the GDC's binomial pdf for $P(X = r)$ and cdf for $P(X \le r)$.

Worked example. 20 % of seeds fail to grow. Five are planted, $X \sim B(5, 0.2)$. $P(X = 1) = 0.4096$, $P(X \ge 1) = 1 - 0.8^5 \approx 0.672$, and $E(X) = 1$.

Vocabulary Train
English
discrete random variable/dɪˈskriːt ˈrændəm ˈveərɪəbl/
expected value/ekˈspektɪd ˈvæljuː/
4.7

The normal distribution

Many measurements follow a normal distribution 正态分布 $X \sim N(\mu, \sigma^2)$: a symmetric bell-shaped curve centred on the mean $\mu$. About 68 % of values lie within $1\sigma$ of the mean, 95 % within $2\sigma$ and 99.7 % within $3\sigma$.

A Galton board with balls piled into a bell shape
A Galton board: balls falling through pins pile up into the bell-shaped normal curve
Normal curve of heights with mean 170 cm and standard deviation 8 cm; the area left of 180 cm, z = 1.25, is shaded and equals 0.894
Probability is area under the curve; z counts standard deviations from the mean

Worked example. Heights $X \sim N(170, 8^2)$ cm.

  • $P(X < 180) = 0.894$ (by GDC; $z = \frac{180 - 170}{8} = 1.25$).
  • $P(160 < X < 180) = 0.789$.
  • The height exceeded by only 10 % of people: inverse normal, $P(X < h) = 0.9$, gives $h \approx 180.3$ cm.
Vocabulary Train
English
normal distribution/ˈnɔːml ˌdɪstrɪˈbjuːʃn/
4.8

Hypothesis testing

The language of a test

  1. The null hypothesis 原假设 $H_0$ says there is no effect or no association. The alternative hypothesis 备择假设 $H_1$ says there is.
  2. Choose a significance level 显著性水平, usually 5 %.
  3. Calculate the p-value: the probability, if $H_0$ were true, of a result at least as extreme as the one observed.
  4. If the p-value is less than the significance level, reject $H_0$. Otherwise there is not enough evidence to reject it. A test never proves $H_0$.

The chi-squared test for independence

The chi-squared test 卡方检验 for independence uses a contingency table 列联表 of observed frequencies. The expected frequency of each cell, if the variables were independent, is

$$E = \frac{\text{row total} \times \text{column total}}{\text{grand total}}, \qquad \chi^2_{\text{calc}} = \sum\frac{(O - E)^2}{E}$$

with degrees of freedom 自由度 $(\text{rows} - 1)(\text{columns} - 1)$. All expected frequencies must be at least 5.

Worked example. 100 people at a school were asked their favourite drink.

Observed Tea Coffee Juice Total
Students 20 18 22 60
Teachers 20 17 3 40
Total 40 35 25 100
  • $H_0$: favourite drink is independent of being a student or a teacher.
  • Expected: students 24, 21, 15; teachers 16, 14, 10. All are at least 5.
  • GDC: $\chi^2_{\text{calc}} \approx 10.9$, with $(2 - 1)(3 - 1) = 2$ degrees of freedom, p-value $\approx 0.0043$.
  • $0.0043 < 0.05$, so reject $H_0$: there is evidence that favourite drink depends on the group. The largest contribution comes from teachers and juice: 3 observed, 10 expected.

You may instead compare $\chi^2_{\text{calc}}$ with the critical value 临界值, given in the question: here 5.991. Since $10.9 > 5.991$, reject $H_0$.

The chi-squared curve with 2 degrees of freedom; the region beyond the critical value 5.991 has area 0.05, and the calculated value 10.9 lies far inside it, with a p-value of 0.0043
Reject $H_0$ when the statistic falls in the 5 % tail

The chi-squared goodness of fit test

A goodness of fit test 拟合优度检验 asks whether data follow a given distribution. The degrees of freedom are the number of classes minus 1.

Worked example. A die is rolled 60 times, giving 8, 9, 12, 7, 10 and 14 for the faces 1 to 6. $H_0$: the die is fair, so each expected frequency is 10. $\chi^2_{\text{calc}} = \frac{4 + 1 + 4 + 9 + 0 + 16}{10} = 3.4$, with 5 degrees of freedom and p-value 0.639. Since $0.639 > 0.05$, there is not enough evidence that the die is biased.

The t-test

The t-test compares the means of two independent samples from normal populations with equal variances (a pooled two-sample t-test). It can be one-tailed 单尾 ($H_1: \mu_1 < \mu_2$) or two-tailed 双尾 ($H_1: \mu_1 \ne \mu_2$). Decide which before looking at the data.

Dot plots of reaction times: coffee group mean 0.317 s, no-coffee group mean 0.355 s; pooled t about minus 3.29, p about 0.0041
The two samples in the t-test

Worked example. Reaction times in seconds for six students who drank coffee, $A$, and six who did not, $B$:

$A$ 0.32 0.29 0.35 0.30 0.33 0.31
$B$ 0.36 0.34 0.38 0.33 0.37 0.35
  • $H_0: \mu_A = \mu_B$; $H_1: \mu_A < \mu_B$, at the 5 % level.
  • GDC (pooled): $\bar{x}_A \approx 0.317$, $\bar{x}_B = 0.355$, $t \approx -3.29$, p-value $\approx 0.0041$.
  • $0.0041 < 0.05$, so reject $H_0$: there is evidence that the coffee group reacts faster. With only six in each group, a larger study would be needed before drawing firm conclusions.

Common mistakes.

  • Reading a strong correlation as proof of cause.
  • Predicting $x$ from the regression line of $y$ on $x$, or extrapolating far beyond the data.
  • Writing accept $H_0$ or $H_0$ is true. Say: there is not enough evidence to reject $H_0$.
  • Comparing the $p$-value the wrong way: reject $H_0$ when $p$ is less than the significance level.
  • Using the wrong degrees of freedom: a $\chi^2$ test for independence on an $r \times c$ table has $(r-1)(c-1)$.
  • Writing $P(X \ge 3) = 1 - P(X \le 3)$ for a binomial variable. It is $1 - P(X \le 2)$.
  • Reading the variance as the standard deviation: $X \sim N(50, 16)$ has $\sigma = 4$.
Vocabulary Train
English
null hypothesis/nʌl haɪˈpɒθəsɪs/
alternative hypothesis/ɔːlˈtɜːnətɪv haɪˈpɒθəsɪs/
significance level/sɪɡˈnɪfɪkəns ˈlevl/
chi-squared test/kaɪ skweəd test/
contingency table/kənˈtɪndʒənsi ˈteɪbl/
degrees of freedom/dɪˈɡriːz ɒv ˈfriːdəm/
critical value/ˈkrɪtɪkl ˈvæljuː/
goodness of fit test/ˈɡʊdnəs ɒv fɪt test/
one-tailed/wʌn teɪld/
two-tailed/tuː teɪld/
4.9

Practice

  1. A school has 300 students in Year 10 and 200 in Year 11. How many from each year are in a stratified sample of 50?
  2. For $3, 5, 7, 7, 8, 10, 12, 20$, find the median and IQR, and show that 20 is an outlier.
  3. Each value in a data set with mean 9 and standard deviation 4.90 is doubled and then 3 is added. Find the new mean and standard deviation.
  4. The regression line of score on hours is $y = 39.3 + 4.87x$ with $r = 0.974$, for 0 to 9 hours. Predict the score for 5.5 hours, and comment on a prediction for 15 hours.
  5. Six students are ranked $1, 2, 3, 4, 5, 6$ in mathematics and $2, 1, 4, 3, 6, 5$ in physics. Find Spearman's rank correlation coefficient and interpret it.
  6. In a class of 30, 18 play football, 12 basketball and 5 both. Find $P(F \cup B)$ and $P(F \mid B)$.
  7. Show that playing football and playing basketball are not independent in question 6.
  8. Two counters are taken without replacement from 3 red and 2 blue. Find the probability that they are the same colour.
  9. A game costs ¥3, with prizes ¥0, ¥2, ¥10 with probabilities 0.5, 0.3, 0.2. Find the expected gain.
  10. $X \sim B(5, 0.2)$. Find $P(X = 1)$, $P(X \ge 1)$ and $E(X)$.
  11. Heights are $N(170, 8^2)$ cm. Find $P(160 < X < 180)$ and the height exceeded by 10 % of people.
  12. Find the expected frequencies for the drinks table, and the degrees of freedom.
  13. Test at the 5 % level whether the die with frequencies 8, 9, 12, 7, 10, 14 is fair.
  14. For the reaction-time data, state the hypotheses for a one-tailed t-test, and interpret the p-value 0.0041.

Answers.

  1. 30 from Year 10 and 20 from Year 11.
  2. Median 7.5; IQR $11 - 6 = 5$; $20 > 11 + 7.5 = 18.5$, so 20 is an outlier.
  3. Mean $2(9) + 3 = 21$; standard deviation $2 \times 4.90 = 9.80$.
  4. About 66 marks, reliable (strong $r$, interpolation); 15 hours gives 112, an unreliable extrapolation beyond the data and the maximum mark.
  5. $r_s \approx 0.829$: strong agreement between the two subjects' rankings.
  6. $\frac{5}{6}$; $\frac{5}{12}$.
  7. $P(F)P(B) = 0.6 \times 0.4 = 0.24$, but $P(F \cap B) = \frac{5}{30} \approx 0.167$.
  8. $0.3 + 0.1 = 0.4$.
  9. $2.6 - 3 = -0.4$ yuan.
  10. 0.4096; 0.672; 1.
  11. 0.789; about 180.3 cm.
  12. Students 24, 21, 15; teachers 16, 14, 10; 2 degrees of freedom.
  13. $\chi^2 = 3.4$, 5 degrees of freedom, p-value 0.639 > 0.05: not enough evidence that the die is biased.
  14. $H_0: \mu_A = \mu_B$, $H_1: \mu_A < \mu_B$. $0.0041 < 0.05$, so reject $H_0$: evidence that the coffee group reacts faster.
4.10

Exam tips

  • Name the sampling method and say why it might be biased in context.
  • Compare data sets with a centre and a spread, in context.
  • Interpret $r$ by strength and direction, and remember that correlation is not causation.
  • Write $H_0$ and $H_1$ in words about the context, and decide one- or two-tailed first.
  • Compare the p-value with the significance level, then write the conclusion in context: “there is (not) enough evidence that …”.
  • Check that every expected frequency in a chi-squared test is at least 5.
Explore

Data summaries, histograms and interpretation

Compare an appropriate average and spread in context

Choose a centre and a spread measure for the worked observations.

Explore

Probability, trees and conditional reasoning

Multiply along a tree branch and add disjoint branches

Compare the model with the worked case and explain one change.

Explore

Hypothesis testing and contextual conclusions

State H₀ and H₁ in population parameters before inspecting the outcome

Compare the model with the worked case and explain one change.

Explore

Confidence intervals, chi-square and regression

For a normal mean with known σ, a 95% interval is sample mean±1

Compare the model with the worked case and explain one change.

Explore

From a raw value to a normal-model area

$z=(x-\mu)/\sigma$

Connect the lesson’s raw values to standardised bounds and the correct shaded region. Changing a model does not show that real data follow it.

Was this helpful?

Interactive lessons on this topic

Work through it step by step, with instant-check exercises.

More topics in IB Mathematics: Applications and Interpretation SL

Log in or create account

IGCSE, A-Level & AP