Skip to content

4 · Statistics and probability

IB Mathematics: Applications and Interpretation HLTopic 4

Video lesson for this topic Open the video page
5:26

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. It is written for both SL and HL students. HL students also apply the further results in the sections marked AHL.

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.
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

AHL: Designing studies and non-linear regression

Reliability and validity

  • A measurement is reliable 可靠 if it gives consistent results. Test–retest reliability repeats the same test on the same people; parallel forms gives two equivalent versions of a test. Compare the results with a correlation coefficient.
  • A measurement is valid 有效 if it measures what it claims to. Content validity asks whether the test covers what it should; criterion validity asks whether it agrees with an accepted measure.
  • In a chi-squared test, combine neighbouring classes if an expected frequency is below 5, and reduce the degrees of freedom by one for each parameter estimated from the data.

Non-linear regression and $R^2$

For any model, the residual 残差 of a point is observed $-$ predicted. The sum of square residuals $SS_{\text{res}}$ measures how far the data are from the model, and the coefficient of determination 决定系数

Bacteria counts at 1 to 6 hours with linear, quadratic and exponential fits; R squared 0.826, 0.989 and 0.9998
Three models for the bacteria count
$$R^2 = 1 - \frac{SS_{\text{res}}}{SS_{\text{tot}}}$$

is the proportion of the variation in $y$ that the model explains. For a straight line, $R^2 = r^2$.

Worked example. A bacteria count is $y = 2.1, 3.9, 8.2, 15.8, 32.5, 63.0$ at $x = 1, 2, \dots, 6$ hours.

Model (GDC) $SS_{\text{res}}$ $R^2$
linear $y = 11.4x - 18.9$ 475 0.826
quadratic $y = 3.45x^2 - 12.8x + 13.3$ 31.0 0.989
exponential $y = 1.03 \times 1.99^x$ 0.596 0.9998

The exponential model has the highest $R^2$ and also makes sense: the count roughly doubles every hour. The quadratic also has a high $R^2$ but predicts a minimum near $x = 1.85$ and falling counts before that, which fits no real process. Choose a model by $R^2$ and by context.

Vocabulary Train
English
reliable/rɪˈlaɪəbl/
valid/ˈvælɪd/
residual/rɪˈsɪdʒuːəl/
coefficient of determination/ˌkəʊɪˈfɪʃənt ɒv dɪˌtɜːmɪˈneɪʃn/
4.10

AHL: Linear combinations and the central limit theorem

Expectation and variance of combinations

For a random variable $X$ and constants $a$ and $b$:

Jam N(500, 6 squared) plus jar N(250, 8 squared) gives total N(750, 10 squared): variances 36 and 64 add to 100
Variances add; standard deviations do not
$$E(aX + b) = aE(X) + b, \qquad \text{Var}(aX + b) = a^2\text{Var}(X)$$

For independent $X_1, X_2, \dots$:

$$E(a_1X_1 \pm a_2X_2) = a_1E(X_1) \pm a_2E(X_2), \qquad \text{Var}(a_1X_1 \pm a_2X_2) = a_1^2\text{Var}(X_1) + a_2^2\text{Var}(X_2)$$

Variances always add, even for a difference. A linear combination of independent normal variables is normal.

Worked example. Jam $C \sim N(500, 6^2)$ g is put in a jar $J \sim N(250, 8^2)$ g, independently of the jam mass. The total $T = C + J \sim N(750, 6^2 + 8^2) = N(750, 10^2)$, so $P(T > 765) \approx 0.0668$.

Note the difference between $3X$ and $X_1 + X_2 + X_3$: one item weighed three times as much has variance $9\sigma^2$, but three separate items have variance $3\sigma^2$.

Unbiased estimates

The sample mean $\bar{x}$ is an unbiased estimate 无偏估计 of the population mean $\mu$. For the variance, divide by $n - 1$, not $n$:

$$s_{n-1}^2 = \frac{n}{n - 1}s_n^2$$

Worked example. Eight batteries last 47.2, 49.5, 48.1, 50.3, 46.8, 48.9, 47.5 and 49.0 hours. $\bar{x} \approx 48.4$, $s_n^2 \approx 1.29$, and the unbiased estimate of the population variance is $s_{n-1}^2 = \frac{8}{7} \times 1.29 \approx 1.48$, so $s_{n-1} \approx 1.21$.

The central limit theorem

The central limit theorem 中心极限定理 says that the mean $\bar{X}$ of a random sample of size $n$ from any population with mean $\mu$ and variance $\sigma^2$ is approximately

$$\bar{X} \sim N\left(\mu, \frac{\sigma^2}{n}\right)$$

when $n$ is large, usually $n \ge 30$. If the population is itself normal, this is exact for any $n$.

Worked example. Waiting times at a bank have mean 8 minutes and standard deviation 8 minutes: most waits are short, a few are long, so the distribution is far from normal. For 64 customers, $\bar{X} \sim N\left(8, \frac{64}{64}\right) = N(8, 1^2)$ approximately, so $P(\bar{X} > 10) \approx 0.0228$.

Left: a strongly skewed distribution of waiting times with mean 8 minutes. Right: the distribution of the mean of 4 waits, still skewed, and of 64 waits, a narrow normal curve centred on 8 with standard deviation 1
Means of larger samples are closer to normal and less spread out

Confidence intervals

A confidence interval 置信区间 gives a range of likely values for the population mean.

Repeated 95% confidence intervals: about 95% capture the true parameter
“95% confident” describes the method, not one interval: over many samples about 95% of the intervals contain $\mu$ and about 5% miss it.
  • If $\sigma$ is known: $\bar{x} \pm z\dfrac{\sigma}{\sqrt{n}}$, with $z = 1.96$ for 95 %. For $n = 25$, $\bar{x} = 172.4$ and $\sigma = 8$: $172.4 \pm 1.96 \times 1.6$, that is $169.3 < \mu < 175.5$.
  • If $\sigma$ is unknown, use $s_{n-1}$ and the t-distribution, with $n - 1$ degrees of freedom (GDC: TInterval). For the eight batteries, the 95 % interval is $47.4 < \mu < 49.4$ hours.

A 95 % interval means: if the sampling were repeated many times, about 95 % of the intervals made this way would contain $\mu$. The claimed mean of 50 hours lies outside the interval.

Vocabulary Train
English
unbiased estimate/ʌnˈbaɪəst ˈestɪmət/
central limit theorem/ˈsentrəl ˈlɪmɪt ˈθɪərəm/
confidence interval/ˈkɒnfɪdəns ˈɪntəvl/
4.11

AHL: The Poisson distribution

The Poisson distribution 泊松分布 $X \sim Po(m)$ counts random events in a fixed interval of time or space, when events happen independently and at a constant average rate $m$.

People waiting in a queue at a terminal
People arriving at random at a steady average rate: the number per minute follows a Poisson distribution
A bar chart of the Poisson distribution with mean 3, leaning to the right
The Poisson distribution $\mathrm{Po}(3)$: for a Poisson variable the mean and variance both equal $\lambda$.
$$P(X = x) = \frac{m^xe^{-m}}{x!}, \qquad E(X) = \text{Var}(X) = m$$

Worked example. A help desk receives on average 3 calls an hour, $X \sim Po(3)$.

  • $P(X = 0) = e^{-3} \approx 0.0498$.
  • $P(X \le 2) \approx 0.423$ (GDC Poisson cdf).
  • In two hours the mean is 6, so $Y \sim Po(6)$ and $P(Y \ge 10) = 1 - P(Y \le 9) \approx 0.0839$.

The sum of independent Poisson variables is Poisson: $Po(m_1) + Po(m_2) = Po(m_1 + m_2)$. A quick check that data might be Poisson: the sample mean and variance should be close.

Vocabulary Train
English
Poisson distribution/ˈpɔɪsn ˌdɪstrɪˈbjuːʃn/
4.12

AHL: Critical regions and errors

Critical regions and the two types of error

The critical region 拒绝域 is the set of results that lead to rejecting $H_0$.

Two bar charts of the number of heads in 20 tosses: under p = 0.5 the bars at 15 and above form the critical region, total probability about 0.0207, the Type I error; under p = 0.7 the bars at 14 and below, total about 0.584, are the Type II error
The critical region X ≥ 15 keeps the Type I error at 0.0207, but with p = 0.7 the test still misses the bias with probability 0.584
  • A Type I error 第一类错误 rejects $H_0$ when it is true. Its probability is the actual significance level.
  • A Type II error 第二类错误 fails to reject $H_0$ when it is false.

Worked example. A coin is tossed 20 times to test $H_0: p = 0.5$ against $H_1: p > 0.5$ at the 5 % level. $X \sim B(20, 0.5)$.

  • $P(X \ge 14) \approx 0.0577 > 0.05$, but $P(X \ge 15) \approx 0.0207 < 0.05$, so the critical region is $X \ge 15$.
  • $P(\text{Type I error}) = P(X \ge 15 \mid p = 0.5) \approx 0.0207$.
  • If in fact $p = 0.7$, $P(\text{Type II error}) = P(X \le 14 \mid p = 0.7) \approx 0.584$: with only 20 tosses, a biased coin is missed more often than not.

More tests

  • One-sample t-test for a mean: eight batteries with $\bar{x} \approx 48.4$ test the claim $\mu = 50$ against $\mu < 50$. GDC: $t \approx -3.70$, p-value $\approx 0.0038$, so reject the claim at the 5 % level.
  • A paired t-test compares two measurements on the same subjects, such as before and after training: test the mean of the differences.
  • A test for correlation uses $H_0: \rho = 0$, where $\rho$ is the population correlation. For the 12 students, $r = 0.974$ gives a p-value far below 0.01, strong evidence of a positive correlation.
  • Binomial and Poisson tests compare an observed count with the distribution under $H_0$, as in the coin example.
Vocabulary Train
English
critical region/ˈkrɪtɪkl ˈriːdʒn/
Type I error/taɪp aɪ ˈerə/
Type II error/taɪp ˈtuː ˈerə/
4.13

AHL: Markov chains

A Markov chain 马尔可夫链 moves between states, and the probability of the next state depends only on the current state. The transition matrix 转移矩阵 $T$ has, in each column, the probabilities of moving from that state; each column adds to 1. If $\mathbf{s}_0$ is the starting state vector, then after $n$ steps

$$\mathbf{s}_n = T^n\mathbf{s}_0$$

Worked example. If today is sunny, tomorrow is sunny with probability 0.8; if today is rainy, tomorrow is sunny with probability 0.4. With states (sunny, rainy):

$$T = \begin{pmatrix} 0.8 & 0.4 \\ 0.2 & 0.6 \end{pmatrix}$$
  • Today is sunny, $\mathbf{s}_0 = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$. Tomorrow: $T\mathbf{s}_0 = \begin{pmatrix} 0.8 \\ 0.2 \end{pmatrix}$. In two days: $T^2\mathbf{s}_0 = \begin{pmatrix} 0.72 \\ 0.28 \end{pmatrix}$.
  • The steady state 稳态 $\mathbf{s}$ satisfies $T\mathbf{s} = \mathbf{s}$: $0.2s_1 = 0.4s_2$, so $s_1 = 2s_2$, and with $s_1 + s_2 = 1$, $\mathbf{s} = \begin{pmatrix} \frac{2}{3} \\ \frac{1}{3} \end{pmatrix}$.
  • In the long run, two days in three are sunny, whatever the weather today. It is the eigenvector of $T$ with eigenvalue 1 (topic 1).
Left: a transition diagram between sunny and rainy with probabilities 0.8 and 0.2 from sunny and 0.4 and 0.6 from rainy. Right: the probability of sun falling from 1 to 0.8, 0.72 and towards the steady state of two thirds
The chain forgets its start and settles at the steady state

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$.
  • HL: subtracting variances: for independent $X$ and $Y$, $\operatorname{Var}(X - Y) = \operatorname{Var}(X) + \operatorname{Var}(Y)$.
  • HL: dividing by $n$ for the unbiased estimate of the variance. It uses $n - 1$.
  • HL: forgetting to scale a Poisson mean: 3 calls per hour means a mean of 1.5 per half hour.
  • HL: mixing up the errors: a Type I error rejects a true $H_0$; a Type II error keeps a false one.
Vocabulary Train
English
Markov chain/ˈmɑːkɒv tʃeɪn/
transition matrix/trænˈsɪʃn ˈmeɪtrɪks/
steady state/ˈstedi steɪt/
4.14

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.
  15. AHL. Explain the difference between reliability and validity, with an example of each.
  16. AHL. Linear, quadratic and exponential models have $R^2$ 0.826, 0.989 and 0.9998 for the bacteria data. Which model would you choose, and why?
  17. AHL. $C \sim N(500, 6^2)$ and $J \sim N(250, 8^2)$ are independent. Find the distribution of $C + J$ and $P(C + J > 765)$.
  18. AHL. $X$ has variance 4. Find $\text{Var}(3X)$ and $\text{Var}(X_1 + X_2 + X_3)$ for three independent copies of $X$.
  19. AHL. Find the unbiased estimate of the population variance from $n = 8$ and $s_n^2 = 1.29$.
  20. AHL. Waiting times have mean 8 and standard deviation 8 minutes. Find the approximate probability that the mean of 64 waits exceeds 10 minutes.
  21. AHL. Find a 95 % confidence interval for $\mu$ when $n = 25$, $\bar{x} = 172.4$ and $\sigma = 8$.
  22. AHL. Calls arrive at a mean rate of 3 an hour. Find the probability of no calls in an hour, and of at least 10 calls in two hours.
  23. AHL. For 20 tosses of a coin, testing $H_0: p = 0.5$ against $H_1: p > 0.5$ at 5 %, find the critical region and the probability of a Type I error.
  24. AHL. In question 23, find the probability of a Type II error if $p = 0.7$.
  25. AHL. For the weather chain $T = \begin{pmatrix} 0.8 & 0.4 \\ 0.2 & 0.6 \end{pmatrix}$, find the probability of sun in two days if today is sunny, and the steady state.
  26. AHL. Explain why the steady state does not depend on today's weather.

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.
  15. AHL. Reliable: consistent results, such as the same score on a retest. Valid: measures what it claims, such as a test that covers the whole syllabus.
  16. AHL. Exponential: highest $R^2$, and the count roughly doubles each hour, which suits growth of bacteria.
  17. AHL. $N(750, 10^2)$; about 0.0668.
  18. AHL. 36; 12.
  19. AHL. $\frac{8}{7} \times 1.29 \approx 1.48$.
  20. AHL. $\bar{X} \sim N(8, 1^2)$, so about 0.0228.
  21. AHL. $169.3 < \mu < 175.5$.
  22. AHL. $e^{-3} \approx 0.0498$; $1 - P(Y \le 9)$ for $Y \sim Po(6)$, about 0.0839.
  23. AHL. $X \ge 15$; about 0.0207.
  24. AHL. $P(X \le 14 \mid p = 0.7) \approx 0.584$.
  25. AHL. 0.72; $\left(\frac{2}{3}, \frac{1}{3}\right)$.
  26. AHL. $T^n\mathbf{s}_0$ approaches the eigenvector with eigenvalue 1 for any starting vector, because the other eigenvalue, 0.4, has powers that tend to 0.
4.15

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.
  • HL: variances add for sums and differences of independent variables.
  • HL: for a critical region, list the probabilities either side of the boundary.
  • HL: a Markov transition matrix has columns that add to 1.
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 HL

Log in or create account

IGCSE, A-Level & AP