The two-sample -test checks whether two populations have different means, using a sample from each. State and an alternative (, or ), run the 2-sample -test on your GDC, and compare the -value with the significance level. Conclude in context, about the population means.
Free account: 5 more practice questions on two-sample t-test with instant feedback, and full worked answers on the free questions. Free, no card. Join free →
always assumes the means are equal. The alternative comes from the claim: "different" gives (two-tailed); "greater" gives (one-tailed). Define each in words, for example "the population mean mass of fish on diet A".
When the test is valid
The two samples should be independent and random, and each population should be roughly normally distributed. If the question asks about the assumptions, state these in context.
Running the test on the GDC
Enter the two samples in two lists, choose the 2-sample -test, set the alternative to match , and set Pooled to Yes: in IB exams the two samples are unpaired and their population variances are assumed equal, so the pooled test is used. Write down the -value (and the statistic if asked) to 3 significant figures.
The decision
If the -value is less than the significance level, reject . With : at 5%, , so reject ; at 1%, , so do not reject . The same data can lead to different conclusions at different levels.
Writing the conclusion
Say what the decision means for the population means, in the context: "There is sufficient evidence at the 5% level that the mean masses differ." Do not claim the test proves the means are equal. For frequency data use a chi-squared test instead.
Key formulas
-test (GDC): compares two population means; Learn it
Test decision: reject if -value significance level (or critical value) Learn it
The IB formula booklet is provided in every exam paper. In the booklet = printed there, so know where to find it; Learn it = not in the booklet, so learn it by heart. All AI SL formulas →
Two-Sample t-Test worked examples
Worked example 1: Stating t-test hypotheses · easy
A biologist claims chinchilla rabbits have a greater mean weight than sable rabbits. Write and using and .
Solution
1. Recall: always assumes equality.
2. : — the population mean weight of chinchilla equals that of sable rabbits.
3. Extract claim: "strictly greater".
4. : — the population mean weight of chinchilla rabbits is greater than that of sable rabbits.
4 steps
Examiner tip: Always use the phrase "population mean" when defining -test hypotheses in words — "sample mean" loses marks.
Worked example 2: Conducting a pooled two-sample t-test · medium
Diet A: kg. Diet B: kg. Do a two-tailed, pooled -test on the GDC and state the -value.
Solution
1. Enter: Diet A in List 1, Diet B in List 2.
2. Navigate: 2-Sample -test.
3. Set: alternative (two-tailed).
4. Pooled: Yes (On). In IB exams you assume the two populations have equal variances, so the pooled test is used.
5. Execute: , .
5 steps
Examiner tip: Check that Pooled is set to Yes (On). In AI exams the two-sample t-test is the pooled one: the samples are unpaired and the two population variances are assumed equal.
Worked example 3: Interpreting the t-test conclusion at 1% · hard
Given from the previous test, write your conclusion at the significance level.
Solution
1. -value: .
2. Threshold: .
3. Compare: .
4. Decision: fail to reject .
5. Conclude: insufficient evidence at the level to conclude a difference between the mean weights of fish on Diet A and Diet B.
5 steps
Examiner tip: Pay attention to the requested significance level — rejects at but not at the stricter .
Two-Sample t-Test exam-style questions
3 questions from our AI SL bank, written in the style of IB papers, easiest first. One has its full worked solution open here. Open the worked answer, or check your answer in the practice area.
Question 1 · easy · 3 marks · Paper 1
A researcher conducts a two-sample -test to determine if there is a difference in the mean lifetimes of two brands of lightbulbs, Brand A and Brand B.
State the null hypothesis, , for this test.
State the alternative hypothesis, , for this test.
Identify whether this is a one-tailed or two-tailed test.
A two-sample -test is performed at a significance level to compare the mean reading speeds of two different age groups. Technology output gives a -value of .
State the condition for rejecting the null hypothesis in terms of the -value.
Write down the conclusion of the test, giving a clear reason.
Full worked solution Free, no sign-in
Reject if the -value is less than the significance level, i.e. A1
Since , reject . R1 There is sufficient evidence of a difference in the mean reading speeds of the two age groups. A1
Every question here has a full worked solution.See them all →
Question 3 · hard · 5 marks · Paper 2
A botanist is testing whether a new fertilizer (Fertilizer B) produces taller plants on average than the current fertilizer (Fertilizer A). She records the heights in cm: Fertilizer A: Fertilizer B:
Assuming the heights are normally distributed with equal variances, she performs an unpaired two-sample -test at the level of significance.
Examiner's noteχ² and t-tests: hypotheses, the comparison and the conclusion in context
Where marks are lost: Recurring in every session: hypotheses that leave out the variables or the population means, "dependent" instead of "not independent", a two-tailed alternative for a one-tailed test, the pooled/unpooled setting mixed up, a p-value misread from E-notation (so greater than 1) or given to 1 s.f., no comparison with the significance level (which loses the mark), a correct comparison followed by the wrong decision, and a generic conclusion where one in context was asked for. Expected frequencies were also left at the wrong accuracy.
What examiners look for: Use a fixed layout: H₀ and H₁ in symbols with the population parameter (μ₁ = μ₂; μ₁ > μ₂) or in words naming both variables for χ²; the p-value; "p < 0.05, so reject H₀" (or not); then one sentence in context.
Examiners flagged this in 3 exam series (May 2024, November 2024, November 2025). Summarised in our own words from IB subject reports, IB Programme Resource Centre. Read the full note →
Two-Sample t-Test on your calculator
A GDC is allowed on every AI paper. Keystrokes for the Casio fx-CG50, TI-84 Plus CE and TI-Nspire, with a checked worked example:
It depends on the claim. If the question asks whether the means are different, it is two-tailed (μ1 ≠ μ2). If it asks whether one mean is greater (or smaller) than the other, it is one-tailed.
What does the p-value tell me in a t-test?
It is the probability of getting a difference at least as large as the one in the samples if the population means were really equal. A small p-value (below the significance level) is evidence against H0.
How many IB Maths AI SL two-sample t-test questions are there?
There are 12 exam-style two-sample t-test questions in the AI SL question bank (Paper 1: 4 · Paper 2: 8), graded 2 easy, 5 medium, 3 hard, 2 very hard. Every question has a full IB-style mark scheme (M, A and R marks).
Is two-sample t-test on Paper 1 or Paper 2?
Both. In the bank, Paper 1: 4 · Paper 2: 8. Practise with your GDC — AI papers expect calculator methods throughout.