IB Maths AI HLHypothesis Testing (Chi-squared)Paper 1 & 2~7 min read
Introduction to Hypothesis Testing
A hypothesis test uses a sample to judge a claim about a whole population. You set up two competing statements — the nullH0 (no change) and the alternativeH1 (how things might have changed) — then use the data to decide which the evidence supports. The decision comes down to one comparison: is the p-value below the significance level (or the test statistic beyond the critical value)? This page is the language and logic that every chi-squared, binomial, Poisson, and normal test builds on.
📘 What you need to know
Null hypothesis H0: the “no change” assumption about a population parameter or distribution.
Alternative H1: how the parameter or distribution might have changed.
Test statistic (observed value): a number calculated from the sample data (your GDC finds it).
Significance level: set before testing (usually 1%, 5% or 10%) — the cut-off for “unlikely by chance”.
p-value: probability of a result at least as extreme as observed, assuming H0 is true.
Decision rule: p-value < significance level → reject H0; otherwise accept H0. (Equivalently: test statistic in the critical region → reject.)
Conclusions are never definitive and must be in context — a different sample could give a different outcome.
The language of hypothesis testing
Every test starts with two hypotheses about a population parameter (like a mean) or the distribution of the population. The null is what you assume true; the alternative is the change you’re testing for.
Null hypothesis H₀
no change
The assumed value or distribution. Assumed true at the start, then accepted or rejected.
Alternative H₁
a change
How the parameter or distribution might have shifted — increased, decreased, or just changed.
Test statistic = observed value: a number calculated from the sample (e.g. a χ2 value). Your GDC computes it, along with the p-value, once you enter the data.
🧠 Memory aid — “p low, H₀ go”
If the p-value is low (below the significance level), reject H0 — the data is too unlikely under the null to keep believing it. If p is high, there isn’t enough evidence to reject, so you accept H0. The significance level is just the agreed line for “too unlikely”.
One-tailed vs two-tailed tests
The shape of H1 decides the tail. If you’re testing for a specific direction (increase or decrease), it’s one-tailed; if you’re only testing whether something changed, it’s two-tailed.
Test type
Used to test…
Examples of tests
One-tailed
a distribution fits, or a parameter has increased or decreased
χ² independence, χ² goodness of fit, binomial proportion, Poisson mean, normal mean, comparing two means
Two-tailed
a parameter has changed (no direction specified)
normal mean, comparing two population means
Chi-squared tests are always one-tailed: both the test for independence and the goodness of fit test only ask whether the data departs from the model — there’s no “increase/decrease” direction to specify.
🤔 Why must the significance level be set before the test?
The significance level is your standard of proof — the threshold for calling a result “unlikely by chance”. If you picked it after seeing the data, you could move the goalposts to get the conclusion you wanted. Fixing it in advance (1%, 5%, 10%) keeps the test honest.
Making the decision
There are two equivalent routes to the same conclusion — use whichever the question gives you.
Test statistic in the critical region (beyond the critical value) → reject H₀; otherwise accept.
The decision at a glance
Both methods always agree — the critical value is just the test-statistic boundary matching the significance level.
🧭 Recipe — writing a valid conclusion
State the decision: reject or accept H0, with the reason (p < α, or stat > CV).
Put it in context — use the wording of the question, not just “H0“.
Keep it tentative: “there is (in)sufficient evidence to suggest…”, never “this proves…”.
For a two-tailed test, conclude only that there’s evidence of a change — don’t say increase or decrease.
WE 1
Identifying the hypotheses
A researcher tests whether favourite subject is related to favourite film genre using a χ² test. State suitable null and alternative hypotheses.
χ² test for independence → hypotheses about independenceH₀: favourite subject is independent of favourite film genre.H₁: favourite subject is not independent of favourite film genre.name the real variables, not “X” and “Y”
WE 2
One-tailed or two-tailed?
For each, state whether a one- or two-tailed test is needed: (i) testing whether a machine’s mean output has changed; (ii) testing whether a new method has increased the mean score.
(i) “changed” — no directiontwo-tailed(ii) “increased” — a directionone-taileda stated direction (↑ or ↓) → one-tailed; just “changed” → two-tailed.
WE 3
Decision from a p-value
A test at the 5% significance level gives a p-value of 0.0243. State the decision and what it means.
compare p with α0.0243 < 0.05reject H₀there is sufficient evidence to suggest H₀ is unlikely to be true (stated in context).
WE 4
Decision from a critical value
A χ² test gives a test statistic of 12.8 against a critical value of 16.812 at the 1% level. State the conclusion.
compare statistic with critical value12.8 < 16.812accept H₀χ² statistic below the critical value → insufficient evidence to reject H₀.
WE 5
Interpreting a two-tailed result
A two-tailed test comparing two population means rejects H0. What can — and can’t — you conclude?
what you CAN saythere is evidence the two means are not equal (they differ).what you CANNOT saywhich mean is bigger — that would need a one-tailed test.change only, not direction
💡 Top tips
Write H₀ and H₁ in context — name the real variables, never just “X” and “Y”.
“p low, H₀ go”: reject when the p-value is below the significance level.
Set the significance level first — it’s fixed before you see the test statistic.
Direction word → one-tailed (increase/decrease); “changed” → two-tailed.
Conclusions stay tentative: “sufficient/insufficient evidence to suggest…”, never “proves”.
Accepting H₀ ≠ proving it — it only means there isn’t enough evidence to reject it.
⚠ Common mistakes
Definitive wording — saying a test “proves” H₀ true or false. A different sample could differ.
Leaving the conclusion out of context — restating “reject H₀” without the real variables.
Stating a direction after a two-tailed test — you can only conclude there’s a change.
Comparing the wrong way — reject when p < α (and when statistic > CV), not the reverse.
Off-by-meaning on “accept” — accepting H₀ means insufficient evidence, not that H₀ is true.
Choosing the significance level after seeing the data — it must be fixed beforehand.
Next up — the Chi-squared Test for Independence. You’ll put this language to work: set up H0/H1 about two variables, build a contingency table, find the degrees of freedom ν = (m−1)(n−1), let the GDC compute the χ2 statistic and p-value, and conclude whether the variables are associated.
Need help with Hypothesis Testing?
Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.