Statistics and probability
🎯What you need to be able to do
- Distinguish population from sample, name the sampling techniques, and explain how a method introduces bias.
- Identify outliers by the \( 1.5 \times \mathrm{IQR} \) rule and decide whether to keep them.
- Present data as histograms, cumulative frequency graphs and box-and-whisker diagrams, and read values off them.
- Calculate and interpret mean, median, mode, quartiles, range, IQR, variance and standard deviation.
- Predict the effect on the mean and standard deviation of adding a constant or multiplying by one.
- Interpret Pearson’s \(r\) and Spearman’s \(r_s\), and know when each is appropriate.
- Fit a regression line and use it to predict — while knowing when not to.
- Use the probability rules with Venn and tree diagrams, including conditional probability and independence.
- Work with discrete random variables, expected value, and the binomial and normal distributions.
- Carry out a \( \chi^{2} \) test for independence, a \( \chi^{2} \) goodness of fit test and a \(t\)-test, and state the conclusion properly.
- AHL Design valid data collection, and distinguish reliability from validity.
- AHL Perform non-linear regression and interpret \( R^{2} \) and the sum of square residuals.
- AHL Use the central limit theorem, confidence intervals, the Poisson distribution and Type I/II errors.
- AHL Build transition matrices and find the steady state of a Markov chain.
📚The mathematics
4.1 Sampling and data
A population is everyone you want a conclusion about; a sample is who you measured. Data is discrete if it counts and continuous if it measures. Know the five techniques — simple random, convenience, systematic, quota and stratified — and be able to describe each and say what could go wrong.
When a question asks you to comment on a method, name the mechanism by which the sample stops resembling the population, not just “it could be biased”. A convenience sample reaches only people who were easy to reach; a survey with a low response rate hears only from people who cared enough to reply; a systematic sample can lock onto a hidden periodic pattern.
An outlier is more than \( 1.5 \times \mathrm{IQR} \) beyond the nearer quartile. That is a definition, not a verdict: decide whether it is a genuine extreme value or a recording error, and say which and why.
4.2 & 4.3 Presenting and summarising
Cumulative frequency graphs give medians, quartiles and percentiles — read across from the right fraction of the total and down to the axis. Box-and-whisker diagrams compare two distributions: medians for centre, IQR or range for spread, whisker lengths for skew. Roughly symmetric box and whiskers suggest the data may be normally distributed.
For grouped data use mid-interval values to estimate the mean; it is an estimate because the individual values are gone. The modal class only means something for equal class intervals.
Compute variance and standard deviation with technology. What you must know is their behaviour: adding a constant \(k\) to every value raises the mean by \(k\) and leaves the standard deviation unchanged; multiplying every value by \(k\) multiplies both the mean and the standard deviation by \(k\), and the variance by \( k^{2} \).
4.4 & 4.10 Correlation
Pearson’s \(r\) measures linear association, between \( -1 \) and \( 1 \). Describe it in two words: strength and direction. A value near zero means no linear relationship — a perfect parabola has \( r \approx 0 \), which is why you look at the scatter diagram as well as the number.
Spearman’s rank correlation \( r_s \) is Pearson’s coefficient applied to the ranks rather than the values. It detects any monotonic relationship, not just a linear one, and it is far less sensitive to outliers because an extreme value only ever moves one place in the ranking. Use \(r\) when you are testing for linearity and \( r_s \) when the relationship may be curved but consistently increasing or decreasing, or when outliers are distorting \(r\). If values tie, average their ranks.
The regression line of \(y\) on \(x\) passes through the mean point \( (\bar{x},\bar{y}) \). The gradient and intercept both mean something in context, and interpreting them is regularly worth marks: the gradient is the change in \(y\) per unit change in \(x\), in the units of the problem.
4.5 & 4.6 Probability
\( \mathrm{P}(A') = 1 - \mathrm{P}(A) \), and the complement is usually the fast route: “at least one” almost always means \( 1 - \mathrm{P}(\text{none}) \).
Events are mutually exclusive when \( \mathrm{P}(A \cap B) = 0 \) and independent when \( \mathrm{P}(A \cap B) = \mathrm{P}(A)\mathrm{P}(B) \). These are different ideas, and testing for independence means computing both sides and comparing them — show both numbers.
On tree diagrams, multiply along branches and add between paths, and check each set of branches sums to 1. Watch whether sampling is with or without replacement.
The expected number of occurrences is \( n \times \mathrm{P} \): if 300 components are made and each has probability 0.04 of being faulty, you expect 12 faulty ones.
4.7–4.9 Distributions
For a discrete random variable, the probabilities must sum to 1 — that is how an unknown in the table is found — and \( \mathrm{E}(X) = \sum x\,\mathrm{P}(X = x) \). In a game where \(X\) is the player’s gain, \( \mathrm{E}(X) = 0 \) means the game is fair; a casino ensures it is negative.
\( X \sim \mathrm{B}(n,p) \) requires a fixed number of independent trials, two outcomes, and a constant \(p\). Then \( \mathrm{E}(X) = np \) and \( \mathrm{Var}(X) = np(1-p) \). Distinguish \( \mathrm{P}(X = k) \) from \( \mathrm{P}(X \le k) \), and remember \( \mathrm{P}(X > 3) = 1 - \mathrm{P}(X \le 3) \) for a discrete variable.
\( X \sim \mathrm{N}(\mu, \sigma^{2}) \) is symmetric about \( \mu \), with roughly 68% within one standard deviation, 95% within two and 99.7% within three. Both directions are examinable: forwards (boundaries to probability) and inverse (probability to boundary). For inverse normal, check which tail you have been given — “the top 10%” needs 0.90 entered, not 0.10.
4.11 Hypothesis testing
This is the distinctive AI SL material and it follows a fixed structure. State \( \mathrm{H}_0 \) and \( \mathrm{H}_1 \), find the \(p\)-value with technology, compare it with the significance level, and write a conclusion in context.
- \( \chi^{2} \) test for independence. Uses a contingency table. \( \mathrm{H}_0 \): the two variables are independent. Degrees of freedom \( = (\text{rows}-1)(\text{columns}-1) \). In examinations tables have at most 4 rows or columns, and expected frequencies will exceed 5.
- \( \chi^{2} \) goodness of fit. Tests whether data follows a stated distribution. \( \mathrm{H}_0 \): the data fits that distribution. At SL the degrees of freedom are \( n - 1 \).
- \(t\)-test. Compares the means of two populations. At SL samples are unpaired, the population variance is unknown and assumed equal, so use the pooled two-sample \(t\)-test. The underlying variable must be normally distributed. Choose one-tailed or two-tailed from the wording: “is there a difference” is two-tailed, “is A greater than B” is one-tailed.
AHL 4.12 Designing data collection
Questionnaire design: questions should be unbiased rather than leading, structured with consistent answer choices, and precise. Choosing which variables to collect, and how to categorise numerical data into a \( \chi^{2} \) table, are examinable judgements — and categories must be chosen so expected frequencies exceed 5. When parameters are estimated from the data itself, the degrees of freedom fall accordingly.
Reliability is consistency: would you get the same result again? Test it by test–retest or parallel forms. Validity is whether you are measuring what you intended at all: content validity and criterion-related validity. A bathroom scale reading 3 kg heavy every time is perfectly reliable and completely invalid, which is the example worth remembering.
AHL 4.13 Non-linear regression
Beyond linear, you may be asked for quadratic, cubic, exponential, power or sine regression, all with technology. Two measures of fit:
- \( SS_{res} \), the sum of the squared residuals — smaller is better, and the regression itself is chosen to minimise it.
- \( R^{2} \), the coefficient of determination — the proportion of the variability in the response variable accounted for by the model. An \( R^{2} \) of 0.87 means 87% of the variation is explained by the model, which is the sentence an interpretation question wants. For a linear model \( R^{2} = r^{2} \).
But \( R^{2} \) alone is a poor way to choose between models: adding parameters always raises it, and a model can fit the data beautifully while being nonsense in context. Look at the residuals, the shape and the plausibility too.
AHL 4.14–4.16 Estimation and confidence intervals
For a linear transformation, \( \mathrm{E}(aX+b) = a\mathrm{E}(X)+b \) and \( \mathrm{Var}(aX+b) = a^{2}\mathrm{Var}(X) \) — the \(b\) shifts without spreading. The sample mean \( \bar{x} \) is an unbiased estimate of \( \mu \), and \( s_{n-1}^{2} \) is an unbiased estimate of \( \sigma^{2} \). Note the \( n-1 \): the ordinary \( s_n^{2} \) systematically underestimates the population variance.
A linear combination of independent normal variables is normal, and in particular \( \bar{X} \sim \mathrm{N}\!\left(\mu, \dfrac{\sigma^{2}}{n}\right) \). The central limit theorem says that for large \(n\) — taken as \( n > 30 \) in examinations — the distribution of the sample mean approaches normality regardless of the distribution the sample was drawn from. That is what makes inference possible on data that is not itself normal.
A confidence interval for a mean uses the normal distribution when \( \sigma \) is known and the \(t\)-distribution when it is not, at any sample size. Interpret it carefully: a 95% confidence interval is a procedure that captures the true mean 95% of the time. When comparing two groups, heavily overlapping intervals mean you cannot claim a difference.
AHL 4.17 & 4.18 Poisson and formal testing
The Poisson distribution \( X \sim \mathrm{Po}(m) \) counts events in a fixed interval when they occur independently at a uniform average rate. Its mean and variance are both \(m\), which is a useful diagnostic: if sample data has mean and variance close together, Poisson is plausible. Sums of independent Poisson variables are Poisson, so a rate per hour scales to a rate per day by scaling \(m\). Contexts: calls to a helpline, emergency admissions, flaws per metre of cable, typos per page.
You should be able to choose between normal, binomial and Poisson from a context. Binomial has a fixed number of trials; Poisson counts occurrences with no fixed maximum; normal is continuous.
Formal testing at HL extends to critical values and critical regions, tests for a population mean, tests for a proportion using the binomial, tests for a Poisson mean, and testing whether a population correlation coefficient is zero. And the two errors:
- Type I — rejecting a true \( \mathrm{H}_0 \). A false positive. Its probability is the significance level.
- Type II — failing to reject a false \( \mathrm{H}_0 \). A false negative.
Lowering the significance level reduces Type I errors and increases Type II errors. Which matters more is a contextual judgement: for a smoke alarm you accept false alarms to avoid missing a fire; for a criminal conviction you accept the reverse.
AHL 4.19 Markov chains
A transition matrix \( T \) has \( T_{ij} \) equal to the probability of moving from state \(j\) to state \(i\), so its columns sum to 1. After \(n\) steps the state is
For a regular chain the state settles to a steady state independent of where it started. Find it either by raising \(T\) to a high power and reading off the columns, or exactly by solving \( T\mathbf{s} = \mathbf{s} \) together with the condition that the entries sum to 1 — and examination questions will say when an exact solution is required. Notice what that equation means: the steady state is the eigenvector of \(T\) with eigenvalue 1, which is why Topic 1 teaches eigenvectors.
✏️Worked example
Year 11: walk 34, cycle 28, bus 38. Year 12: walk 26, cycle 20, bus 54.
(a) State the null and alternative hypotheses for a \( \chi^{2} \) test for independence. (b) State the number of degrees of freedom. (c) The test gives \( \chi^{2}_{calc} = 6.83 \) and a \(p\)-value of 0.0329. Using a 5% significance level, state and interpret the conclusion. (d) Explain what would change if a 1% significance level had been used.
(a) \( \mathrm{H}_0 \): method of travel to school is independent of year group. \( \mathrm{H}_1 \): method of travel to school is not independent of year group. Both must be phrased in context — “the variables are independent” is too vague to earn the mark.
(b) The table is 2 rows by 3 columns, so
(c) Compare \( p = 0.0329 \) with the significance level \( 0.05 \). Since \( 0.0329 < 0.05 \), reject \( \mathrm{H}_0 \). In context: there is sufficient evidence at the 5% significance level to conclude that method of travel to school depends on year group. Looking at the data, the difference is driven mainly by bus use, which is markedly higher in Year 12.
(d) At the 1% level the comparison becomes \( 0.0329 > 0.01 \), so you would not reject \( \mathrm{H}_0 \). The same data and the same statistic now give the opposite decision, because a 1% level demands stronger evidence before accepting a claim. The result is therefore significant at 5% but not at 1% — which is a genuinely informative thing to say about it.
📝Practise
Work through these, then reveal the answer. Each question targets a different objective from the list above.
1. The times (minutes) taken by 9 students to complete a puzzle are 12, 15, 15, 18, 20, 22, 25, 27, 48. Find the median and quartiles, and determine whether 48 is an outlier.
2. Eight countries are ranked by GDP per capita and by average life expectancy. Explain why Spearman's \( r_s \) might be preferred to Pearson's \( r \) here.
3. In a factory, 6% of items are defective. A sample of 25 is taken. Find the probability that (a) exactly 2 are defective, (b) more than 3 are defective, (c) the expected number of defectives.
4. Two groups of students sit the same test. Group A (\(n = 20\)) has mean 64.2 and Group B (\(n = 22\)) has mean 69.8. A two-tailed \(t\)-test gives \( p = 0.041 \). State the hypotheses and the conclusion at the 5% level, and state one assumption required.
5. AHL A call centre receives calls at an average rate of 4.5 per 10-minute interval. Find the probability of (a) exactly 6 calls in 10 minutes, (b) fewer than 3 calls in 5 minutes.
6. AHL Commuters choose train or car. Each week, 85% of train users stay with the train and 10% of car users switch to the train. Write the transition matrix and find the long-term proportion using the train.
🔗Go deeper — other people’s work
These are external resources, not mine. If one stops working, tell me and everything above it on this page still stands.
- Seeing Theory (Brown University) — visual, interactive probability, distributions and inference
- Setosa — an animated explanation of Markov chains
- Spurious Correlations — a whole site of strong \(r\) values with no causation whatsoever