IB Diploma Programme · Maths AI Higher Level

Statistics and Probability

Cover illustration for Statistics and Probability (Maths AI Higher Level (HL)).
IBDP · Maths AI HL

Statistics and Probability

AI HL Topic 4 — Statistics and Probability

48 min readAdvancedLargest single topic in AI HL — roughly 30% of the course, spread across Paper 1 and Paper 2. The HL-only material (hypothesis tests, confidence intervals, χ² tests, Poisson, unbiased estimators) is a favourite source of Paper 2 extended-response questions because it forces you to combine GDC output with written interpretation.

This topic is really four toolkits stacked on top of each other: you describe data, you model randomness with probability rules, you formalise that modelling into distributions, and then you use sample data plus those distributions to make justified claims about a whole population — that's inference. Every mark in this topic comes from picking the right tool for the scenario in front of you and then showing the working that got you there, not just quoting a GDC output.

Overview

The four pillars, and how they connect

Descriptive statistics organises and summarises raw data you already have. Probability builds the rules for how random outcomes behave. Probability distributions are the formal mathematical models (binomial, Poisson, normal) that probability theory produces. Inferential statistics is where it all cashes out: you take a sample, assume a distribution, and use probability to decide what you can (and can't) claim about the wider population.

  • At SL, most of this topic is computational — mean, SD, r, binomial/normal probabilities on a GDC.
  • At HL, the syllabus adds the inferential layer: unbiased estimators, confidence intervals, hypothesis tests (z, t, paired-t, χ²), and the Poisson distribution.
  • The GDC does almost all the arithmetic for you at HL — the marks are for setting up the right model, stating conditions, and writing the conclusion in context.

The shape of the chapter

Command terms that decide how you answer

Command termWhat it demandsAOMark-earning move
Show thatDerive the given (already-known) result, with every substitution step visible — not a bare GDC read-out.AO2Method marks for the formula and substitution; quoting only the final number that happens to match scores 0/2.
StateGive a fact or result with no derivation — e.g. state H0 and H1, state the distribution and its parameters.AO11 mark per correct, correctly-notated statement (μ not x̄ for a population parameter).
Determine / CalculateFind a numerical value, GDC use is expected.AO2Follow-through applies if an earlier value was wrong but the method is consistent.
Comment on / InterpretLink the statistical result back to the real-world context in a full sentence.AO3A generic 'there is a relationship' with no reference to the named variables scores 0 for this mark.
Test whether... at the ...% levelFull four-step hypothesis test: hypotheses → test statistic/p-value → decision rule → conclusion in context.AO2/AO3Marks are split across all four steps — a perfect p-value with no final contextual sentence still drops the last mark.

Key point

Nearly every inferential question reduces to the same move: compare a test statistic (or its p-value) to a threshold, decide, then write ONE sentence translating that decision back into the scenario's own words — that sentence is where examiners hide the easiest lost mark.

Inferential Statistics (HL)

From sample to population

Everything here answers one question: given only a sample, what can I responsibly claim about the population it came from? That requires (a) an honest sample, (b) an estimator that doesn't systematically over- or under-shoot the true value, and (c) a rule for deciding when sample evidence is strong enough to overturn an assumed value.

  • Unbiased estimator: a statistic whose expected value equals the population parameter it estimates. is an unbiased estimator of .
  • Sample variance needs a correction: dividing by (as you would for a whole population) under-estimates on average, so the unbiased estimate divides by instead — this is the your GDC labels separately from .
  • Confidence interval: a range of plausible values for , built around , that captures the true in (say) 95% of samples repeated indefinitely — it does NOT mean 'there's a 95% chance is in this interval'.
  • Hypothesis test: assume is true, see how surprising your sample result would be under that assumption (the p-value), and reject only if the result is surprising enough (p < significance level).

The inferential toolkit

confidence interval for when is unknown (almost always the case at HL)

— critical t-value from the t-distribution, df = n − 1, found via invT on GDC
Data booklet

one-sample z-test statistic — only when is given

Data booklet

one-sample t-test statistic — when only sample s is known

Data booklet

paired t-test on the differences between matched observations

Data booklet

expected frequency in a contingency table cell, under the assumption of independence

Memorise

chi-squared test statistic — same formula for both independence and goodness-of-fit tests

Data booklet

degrees of freedom for a test of independence

Memorise

Rejection region for a one-tailed test

If your calculated test statistic falls inside the shaded critical region, you reject .

z = 0z = -1.645 (critical value, α = 0.05)shaded area = 0.05observed z = -1.77 (dashed line)

Worked example

Confidence interval — wingspan sample (Q6 style)

[3]
A biologist measures the wingspan of 12 butterflies: cm, cm. Assuming is normal, show that the 90% confidence interval for is to 3 s.f.

Worked example

Confidence interval — weekly homework time (Q7 style)

[3]
, min, min. Show that the 95% CI for is to 3 s.f.

Worked example

One-tailed hypothesis test — coffee machine (Q5 style)

[5]
. Sample of 10 cups gives ml. Test at the 5% level whether the mean volume has fallen below 200 ml.

Worked example

Paired t-test — before/after teaching method (Q8 style)

[6]
Differences (after − before) for 8 students: . Test at the 5% level whether the new method improves scores.

Worked example

χ² test for independence — car colour and age group (Q2 style)

[7]
Young: red 27, blue 33, green 20. Old: red 33, blue 17, green 30. (a) Show . (b) Show . (c) Test independence at 5%.

The degrees-of-freedom slip

Computing perfectly but then reading the critical value from the wrong row of the table (or entering the wrong df in the GDC) — commonly using , or rows×columns, instead of .

Consequence: The final accept/reject decision — and its mark — can flip even though every number before it was correct.

Fix: Write df explicitly as a labelled line: 'df = (2−1)(3−1) = 2' before touching the critical value or GDC p-value function.

"Show that" means show the substitution

For any 'show that' part (Q2a, Q2b, Q6a, Q7a all use this exact phrasing) you must write the formula with numbers plugged in BEFORE the final value — a bare GDC-derived number with the correct value but no visible substitution line scores 0 out of the available marks, because the mark scheme rewards the method line specifically.

Mnemonic

When the P is low, the H-nought must go.

If the p-value is less than the significance level , reject . If , you do not have enough evidence to reject — you never 'accept' , only fail to reject it.

Inferential mix-ups that cost marks

Concept AConcept BThe distinction that matters
Type I errorType II errorType I = rejecting a TRUE (false alarm), probability . Type II = failing to reject a FALSE (missed effect), probability . Tightening to reduce Type I risk automatically increases Type II risk.
One-tailed testTwo-tailed testOne-tailed uses < or > (a direction was suspected beforehand, e.g. 'the mean has fallen'). Two-tailed uses ≠ (only 'has changed' is suspected). This choice fixes which critical value or which tail of the p-value you use.
z-testt-testUse z only when the population SD is stated as known. Use t whenever you only have the sample SD — which is almost every HL exam scenario.

Which inferential test do I use?

ScenarioTestTest statisticDistribution / df
One sample, σ knownOne-sample z-testStandard normal
One sample, σ unknown (use s)One-sample t-testt-distribution, df
Same subjects measured twice (before/after)Paired t-test on differencest-distribution, df
Association between two categorical variablesχ² test for independencedf
Observed vs a claimed/theoretical distributionχ² goodness-of-fit testdf (minus parameters estimated)

Hypothesis testing keeps medicine safe

A pharmaceutical QC lab runs a Q5-style test on every batch of tablets: = potency meets specification. Reject too readily (Type I) and you scrap perfectly good stock at huge cost; fail to reject when the batch really is substandard (Type II) and unsafe medication reaches pharmacies. Regulatory bodies like the FDA literally set the significance level as policy — that's this exact 4-mark exam skill, run at industrial scale.

Key takeaways

  • Always check whether is given (z-test) or only is known (t-test, df ) before choosing a test statistic.
  • A confidence interval is a range for the PARAMETER; a hypothesis test decides whether a specific claimed value is plausible — same underlying t or z machinery, different question being answered.
  • Chi-squared df: for independence; expected frequencies should generally be for the test to be valid.
  • Every hypothesis-test answer needs: hypotheses in symbols → test statistic/p-value → comparison to or critical value → one sentence of conclusion IN CONTEXT.

Descriptive Statistics

Sampling vocabulary

Population
The entire group you actually want to know something about.
Sample
A subset of the population actually measured — used to make inferences about the population.
Simple random sampling
Every member of the population has an equal chance of selection (e.g. names drawn from a hat).
Systematic sampling
Select every -th member from a list after a random starting point.
Stratified sampling
Divide the population into subgroups (strata) sharing a characteristic, then sample proportionally from each stratum.Guarantees representation of every subgroup — used when subgroups might behave very differently.
Quota sampling
Interviewer fills fixed quotas per subgroup using convenience/judgement — non-random, so can introduce bias.
Convenience sampling
Whoever is easiest to reach is sampled — fast but often badly biased.
Outlier
A data value more than beyond the nearer quartile ( or ).

Centre, spread, and bivariate relationships

mean, including grouped/frequency data (use midpoints for grouped intervals)

Data booklet

population variance; on GDC

Data booklet

unbiased sample variance estimate; the GDC's button

Formal justification of this correction is HL content (see Inferential Statistics).

interquartile range; outlier boundary is to

Memorise

Pearson's product-moment correlation coefficient (linear association, )

Data booklet

Spearman's rank correlation coefficient, = difference in ranks

Data booklet

least-squares regression line (regression of y on x)

Data booklet

effect of a linear transformation on the mean and variance of a data set

Scatter diagram with a quadratic regression model

When the scatter clearly rises then falls, a straight-line regression is the wrong model even if it 'runs through the middle' of the data — fit a quadratic instead.

t (hours), axis 0 to 9x (μg/mL), axis 0 to 26curve: x = -0.572t² + 5.64t + 9.11vertex ≈ (4.93, 23.0)

Worked example

Linear regression from summary statistics (Q3 style)

[5]
For fish: . Find the regression line and use it to predict length at age 7.

Extrapolation treated as fact

Plugging an x-value far outside the range of the original data into a regression equation and reporting the output as a reliable prediction.

Consequence: The 'comment on reliability' mark is lost even if the arithmetic prediction itself is technically correct.

Fix: State explicitly: 'this is extrapolation beyond the range of the data ( to ), so the prediction may not be reliable.'

r near zero doesn't mean 'no relationship'

Q4's drug-concentration data rises then falls — a textbook curved relationship. Computed on the raw t and x values, Pearson's r would come out small because r only detects LINEAR association. The correct move is to look at the scatter shape first: monotonic-but-curved → try Spearman's rₛ or a non-linear regression (quadratic here); U-shaped or hump-shaped → linear r is actively misleading, don't quote it as evidence of 'no relationship'.

Pearson vs Spearman

Concept AConcept BThe distinction that matters
Pearson's rSpearman's rank Pearson's r measures LINEAR association on raw values and is distorted by outliers. Spearman's measures monotonic association on the RANKS, so it still works for a consistently increasing/decreasing but curved relationship and shrugs off outliers.

Key takeaways

  • Stratified/systematic/quota/convenience sampling — know the definition AND the bias each one risks, examiners ask 'comment on' this.
  • Sample variance uses for the unbiased estimate ( on GDC) — the theory behind why lives in Inferential Statistics.
  • tests LINEAR fit only — a curved scatter needs Spearman's rank or a non-linear regression model, not a dismissed Pearson's r near 0.
  • Never trust a regression prediction outside the range of the original data without flagging it as extrapolation.

Probability

Foundations

Sample space, or
The set of all possible outcomes of a trial.
Event
A subset of the sample space — a collection of outcomes you're interested in.
Complementary event,
Everything in the sample space NOT in ; .
Conditional probability,
The probability of occurring GIVEN that has already occurred — restricts the sample space to .

Combining events

addition rule (subtract the overlap so it isn't double-counted)

Data booklet

conditional probability

Data booklet

test for independence — any one of the three forms proves it

mutually exclusive events cannot both occur

Two-stage tree diagram with conditional reversal

Multiply ALONG a branch for a joint probability; add branches leading to the same outcome for its total probability.

P(A)=0.6P(B)=0.4P(Def|A)=0.05P(Def|B)=0.08P(A∩Def)=0.03P(B∩Def)=0.032P(Def)=0.062

Worked example

Reversing a tree diagram (Bayes' via tree)

[5]
Machine A makes 60% of items (5% defective); Machine B makes 40% (8% defective). An item is picked at random and found defective. Find the probability it came from Machine A.

Swapping the condition in $P(A|B)$

Confusing with — writing down the tree's forward probability when the question actually asks for the reversed (posterior) probability.

Consequence: The final answer is a completely different number, not just a rounding slip — full marks lost on that part.

Fix: Underline the GIVEN event in the question first (it goes on the right of the bar), then check whether your tree already gives you that conditional directly or whether you need to reverse it.

The classic probability trap

Concept AConcept BThe distinction that matters
Mutually exclusive eventsIndependent eventsMutually exclusive: — if A happens, B literally cannot. Independent: — knowing A happened doesn't change B's probability. Two mutually exclusive events with non-zero probabilities can NEVER be independent, since A occurring guarantees B did not.

State which rule you're using

When a question gives a table or Venn diagram and asks 'are A and B independent?', explicitly compute BOTH and and compare them — a bare 'yes/no' with no supporting calculation loses the method mark even if the conclusion is correct.

Key takeaways

  • Multiply along tree branches for joint probabilities; add branches for a total (marginal) probability.
  • To find a 'reversed' conditional probability ( when the tree gives ), divide the relevant joint probability by the total probability of the conditioning event.
  • Mutually exclusive ⇒ NOT independent (unless one has probability zero) — this is tested directly as a true/false justification question.
  • Always define which event is 'given' before writing — order inside the bar is not interchangeable.

Probability Distributions

From single events to whole models

A probability distribution assigns a probability to every possible value of a random variable. Discrete variables (binomial, Poisson) list probabilities for exact counts; the continuous normal distribution instead gives probability as AREA under a density curve.

  • Discrete random variable: , .
  • Binomial B(n,p): fixed number of independent trials , only two outcomes per trial, constant success probability .
  • Poisson Po(λ) — HL only: counts of independent random events occurring at a constant AVERAGE rate over a fixed interval; unlike the binomial there's no fixed 'number of trials'.
  • Normal N(μ,σ²): continuous, symmetric, bell-shaped; standardise with to use tables, or use GDC normalcdf/invNorm directly with the real parameters.
  • HL linear transformation of a random variable: , ; for independent : , .

Distribution formulas

binomial probability mass function

— number of trials
— probability of success
Data booklet

binomial mean and variance

Data booklet

Poisson probability mass function — HL only

Data booklet

Poisson mean equals variance — HL only, a useful sanity check

standardising a normal variable

Data booklet

linear transformation of a random variable — HL only

Reading probability as area under the normal curve

is the shaded area — read directly off normalcdf, no need to standardise by hand unless the question demands it.

μ = 65x-axis 40 to 90shaded region x > 75z = (75-65)/8 = 1.25P(X>75) ≈ 0.106

Worked example

Binomial and normal in one scenario

[6]
: find , , . Separately, : find and the value such that .

Worked example

Poisson model — HL only

[4]
A call centre receives calls at an average rate of 3 per 10-minute interval, modelled by . Find and .

Discrete boundary errors

Treating as the same as for a discrete distribution — GDC's binomialcdf/poissoncdf functions give by default.

Consequence: An off-by-one error that shifts the final probability, common on both binomial and Poisson questions.

Fix: For strict inequalities, rewrite first: , THEN put it into the GDC.

Binomial vs Poisson vs Normal

FeatureBinomial B(n,p)Poisson Po(λ) — HL onlyNormal N(μ,σ²)
Type of variableDiscreteDiscreteContinuous
Parametersn (trials), p (success prob.)λ (mean rate)μ (mean), σ² (variance)
Mean
Variance
When to useFixed n independent trials, constant p, two outcomesCount of rare independent events over a fixed interval at a constant average rateSymmetric bell-shaped continuous data (heights, measurement errors, ...)
Key GDC functionbinomialpdf / binomialcdfpoissonpdf / poissoncdfnormalcdf / invNorm

Poisson prices your insurance

Insurers model rare-event claims (house fires, flight cancellations, industrial accidents) as Poisson processes: is estimated from historical claim rates, and the whole premium structure is built on calculations from that single parameter — the exact GDC skill in the worked example above, just with much higher stakes.

Key takeaways

  • Binomial needs a fixed number of trials and constant ; Poisson needs a constant average RATE with no natural trial count — mixing these up is a modelling error, not an arithmetic one.
  • Poisson's defining quirk: mean = variance = , always.
  • Sketch the normal curve before using invNorm to avoid feeding in the area for the wrong tail.
  • but — the shifts the mean but never affects spread.

Quick Reference

Statistics & Probability — everything on one page

Formulas

  • confidence interval for μ (σ unknown)
  • one-sample t-test
  • paired t-test on differences
  • χ² test for independence
  • expected frequency in contingency table
  • Pearson's correlation coefficient
  • least-squares regression line y = a + bx
  • conditional probability
  • binomial mean & variance
  • Poisson mean = variance (HL)
  • standardising a normal variable
  • linear transformation of a random variable (HL)

Key facts

df for χ² independence test
(rows − 1)(columns − 1)
df for any single/paired t-test
n − 1
Outlier boundary
beyond or
Binomial variance
np(1−p)
Poisson variance
equals the mean, λ

Mnemonics

  • When the P is low, the H-nought must go.If p-value < α, reject .

Don't confuse

  • Type I error vs Type II error: Rejecting a true (α) vs failing to reject a false (β).
  • z-test vs t-test: σ known → z; only s known → t (df = n−1).
  • Mutually exclusive vs Independent: vs — mutually exclusive events (with p>0) can never be independent.
  • Pearson's r vs Spearman's : Linear association on raw values vs monotonic association on ranks (robust to outliers/curvature).

Command terms

Show that:
Write the formula with substituted values before the final answer — no bare GDC number.
State:
Give the fact with correct notation, no working needed.
Comment on / Interpret:
Full sentence linking the number back to the real-world context.
Test whether...:
Hypotheses → test statistic/p-value → decision rule → conclusion in context, all four required.

Exam checklist

  • Did I state H0 and H1 in symbols with correct direction (one-tailed vs two-tailed)?
  • Did I check σ known (z) vs only s known (t), and get df = n−1 right?
  • Did I check all expected frequencies before trusting a χ² test (ideally ≥ 5)?
  • Did I sketch the normal curve before using invNorm, to get the correct tail?
  • Did I write a final conclusion sentence IN CONTEXT, not just 'reject H0'?
  • Did I flag extrapolation if a regression prediction falls outside the data range?