t-test (AI SL)
The \(t\)-test compares a sample mean against a claimed population mean (or compares two sample means) to decide whether the observed difference is likely to be real or just due to natural sampling variation. Your GDC does the heavy computational lifting - your job is to set up the hypotheses correctly, read off the \(p\)-value, and state a conclusion in context. It's part of the broader Hypothesis Testing topic.
35 questions on this sub-topic.
Setting up the test
Covered under IB syllabus reference SL4.11: formulation of \(H_0\) and \(H_1\), significance levels, \(p\)-values, and using the \(p\)-value to compare the means of two populations in one- and two-tailed tests.
The test statistic
\(t = \dfrac{\bar{x} - \mu_0}{s / \sqrt{n}}\)
Not in the formula booklet - the syllabus expects the GDC to compute this and return the \(p\)-value directly, not a by-hand calculation.
Decision rule
Reject \(H_0\) if \(p < \alpha\)
Compare the GDC's \(p\)-value to the stated significance level \(\alpha\) (commonly 5% or 1%). If \(p \geq \alpha\), you do not reject \(H_0\).
Need the full syllabus wording, formula table, and GDC key sequences? See Hypothesis Testing.
Worked examples
A gym claims its new training programme increases mean resting heart rate. Write down \(H_0\) and \(H_1\) for a one-tailed \(t\)-test. The baseline mean is 70 bpm.
(a)(i) State \(H_0\).
(a)(ii) State \(H_1\).
Worked solution
\(H_0:\) \(\mu = 70\) bpm. A1
\(H_1:\) \(\mu > 70\) bpm. A1
"Increases" indicates a right-tailed test: \(H_1\) uses \(>\), not \(\neq\).
A nutritionist claims the mean daily calorie intake of adults is 2000 kcal. A random sample of 8 adults gives intakes (kcal):
1850, 2100, 1950, 2200, 1900, 2050, 2150, 1800
(a)(i) State \(H_0\) for a two-tailed test.
(a)(ii) State \(H_1.\)
(b) Using a GDC, find the \(p\)-value for a \(t\)-test.
(c)(i) State your conclusion at the 5% significance level.
(c)(ii) Give a reason for your conclusion.
Worked solution
(a)(i) H₀: μ = 2000 A1
(a)(ii) H₁: μ ≠ 2000 A1
(b) GDC t-test (2-tailed, df=7): M1
p-value ≈ 1.00 A1
(c)(i) Since p = 1.00 > 0.05, R1 we do not reject H₀.
(c)(ii) There is insufficient evidence that the mean intake differs from 2000 kcal. A1
Common mistakes
- Treating "reject \(H_0\)" as proof that \(H_1\) is true. A hypothesis test only measures the strength of evidence at a chosen significance level - it never proves anything with certainty, in either direction.
- Choosing the wrong tail. "Different from" or "changed" means a two-tailed \(H_1\) with \(\neq\); "increases", "decreases", "is greater/less than" means a one-tailed \(H_1\) with \(>\) or \(<\). Missing this changes which \(p\)-value the GDC should be comparing against \(\alpha\).
- Writing hypotheses about \(\bar{x}\) instead of \(\mu\). \(H_0\) and \(H_1\) are statements about the unknown population mean \(\mu\), not the particular sample mean \(\bar{x}\) you happened to calculate.
Ready to practise properly?
37 t-test questions, marked instantly like the real exam.
Quick answers
How do I know if a t-test should be one-tailed or two-tailed?
Use a one-tailed test (\(H_1\) with \(<\) or \(>\)) when the claim states a direction, such as "increases" or "is less than". Use a two-tailed test (\(H_1\) with \(\neq\)) when the claim only says the mean has "changed" or "is different".
What is the decision rule for a t-test?
Reject \(H_0\) if the \(p\)-value is less than the significance level \(\alpha\); otherwise do not reject \(H_0\). The \(p\)-value itself is read directly from the GDC's \(t\)-test output.