Home › IB Maths AI SL › Questions by topic › Two-Sample t-Test

IB Maths AI SL · Unit 4: Statistics and Probability

Two-Sample t-Test (IB Maths AI SL): notes, exam questions and worked examples

Updated October 2026 · By Pete Bromfield

The two-sample t-test checks whether two populations have different means, using a sample from each. State H0:μ1=μ2 and an alternative (≠, < or >), run the 2-sample t-test on your GDC, and compare the p-value with the significance level. Conclude in context, about the population means.

Practise two-sample t-test questions →

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 →

Try it first

1 of 6

  1. Question 1 of 6
  2. Question 2 of 6
  3. Question 3 of 6
  4. Question 4 of 6
  5. Question 5 of 6
  6. Question 6 of 6

Start with one question on hypothesis testing. Stuck? Take a hint. No sign-in needed.

A test at the 5% significance level gives a p-value of 0.08. What do you conclude?
Choose your answer · keys 1–4

Two-Sample t-Test notes

Hypotheses

H0:μ1=μ2 always assumes the means are equal. The alternative comes from the claim: "different" gives μ1≠μ2 (two-tailed); "greater" gives μ1>μ2 (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 t-test, set the alternative to match H1, 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 p-value (and the t statistic if asked) to 3 significant figures.

The decision

If the p-value is less than the significance level, reject H0. With p=0.0163: at 5%, 0.0163<0.05, so reject H0; at 1%, 0.0163>0.01, so do not reject H0. 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

t-test (GDC): compares two population means; H0:μ1=μ2 Learn it
Test decision: reject H0 if p-value < significance level (or χcalc2> 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 H0 and H1 using μc and μs.

Solution

4 steps
Examiner tip: Always use the phrase "population mean" when defining t-test hypotheses in words — "sample mean" loses marks.

Worked example 2: Conducting a pooled two-sample t-test · medium

Diet A: 1.2,1.4,1.3,1.5,1.4 kg. Diet B: 1.5,1.6,1.4,1.7,1.6 kg. Do a two-tailed, pooled t-test on the GDC and state the p-value.

Solution

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 p=0.0163 from the previous test, write your conclusion at the 1% significance level.

Solution

5 steps
Examiner tip: Pay attention to the requested significance level — p=0.0163 rejects at 5% but not at the stricter 1%.

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 t-test to determine if there is a difference in the mean lifetimes of two brands of lightbulbs, Brand A and Brand B.

  1. State the null hypothesis, H0, for this test.
  2. State the alternative hypothesis, H1, for this test.
  3. Identify whether this is a one-tailed or two-tailed test.

Question 2 · medium · 3 marks · Paper 2

A two-sample t-test is performed at a 5% significance level to compare the mean reading speeds of two different age groups. Technology output gives a p-value of 0.027.

  1. State the condition for rejecting the null hypothesis in terms of the p-value.
  2. Write down the conclusion of the test, giving a clear reason.

Full worked solution Free, no sign-in

  1. Reject H0 if the p-value is less than the significance level, i.e. p<0.05 A1
  2. Since 0.027<0.05, reject H0. 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: 12,15,14,11,16,14,13
Fertilizer B: 16,18,17,14,19,17,16,18

Assuming the heights are normally distributed with equal variances, she performs an unpaired two-sample t-test at the 1% level of significance.

  1. State the alternative hypothesis for this test.
  2. Using your GDC, find the p-value for this test.
  3. State your conclusion in context.

Free account — sign in to download Topic PDF: 7 questions with worked answers · 4 pages · 171 KB

All 12 two-sample t-test questions →

Where students lose marks on two-sample t-test

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:

Two-Sample t-Test FAQ

Is the t-test one-tailed or two-tailed?

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.

Next steps

More AI SL Unit 4: Correlation & Regression · Descriptive Statistics · Probability · Normal & Binomial Distributions · Sampling Techniques · Chi-Squared Tests · Venn Diagrams & Hard Probability

Teaching this topic? Free ready-to-teach lesson (slides and teacher notes): Two-sample t-test.

Keep revising AI SL: AI SL revision notes · IB Maths AI SL past papers · AI SL common exam mistakes · AI SL syllabus checklist · AI SL statistics and probability knowledge organiser

What else is free here

Save your answers and track your progressA free account remembers the questions you have done on every topic and brings you back to this page.

Join free

Already have an account? Sign in

← All IB Maths AI SL topics