AP Statistics · Unit 4 · Topic 4.9

    4.9 Setting Up a Test for the Difference Between Two Population Means

    Reviewed by P V Satish, Senior Faculty of Science and Academic Consultant · PG Life Sciences, PGD Biotechnology · 20+ years teaching NEET and AP · Special interest in biotechnology, biochemistry and the basics of physics
    Updated

    In short

    To compare two independent groups, test H0:μ1−μ2=0H_0: \mu_1 - \mu_2 = 0 against Hₐ: μ₁ − μ₂ > 0, < 0 or ≠ 0, defining μ₁ and μ₂ in context. Check: two independent random samples or random assignment; 10% for each sample; normal/large sample for each group. Use a paired test instead when values are naturally linked.

    What you need to know

    • Write hypotheses for a two-sample t-test, defining both parameters.
    • Choose between a two-sample t-test and a paired t-test.
    • Verify the conditions for a two-sample t-test.
    • Explain how the design affects the conclusion that can be drawn.

    Hypotheses

    In the teaching experiment (topic 4.7), 47 volunteers were randomly assigned to Method A (worked examples) or Method B (videos). The researcher wants to know whether the two methods give different mean scores.

    H0:μA−μB=0Ha:μA−μB≠0H_0: \mu_A - \mu_B = 0 \qquad H_a: \mu_A - \mu_B \neq 0

    where μ_A and μ_B are the true mean test scores for students like these taught with Method A and Method B. The alternative is two-sided because the question asks whether the methods 'give different' means. If the researcher had suspected in advance that worked examples are better, Hₐ would be μ_A − μ_B > 0.

    Two-sample or paired?

    Choosing the procedure
    DesignProcedureParameter
    Two separate groups (different individuals)Two-sample t-testμ₁ − μ₂
    Each individual measured twice, or matched pairsPaired t-test on the differencesμ_d

    Example: to compare two energy drinks on reaction time, giving each of 20 people both drinks (in random order, on different days) is paired; giving one drink to 10 people and the other to 10 different people is two-sample. Pairing usually gives a more powerful test, because each person is compared with themselves, removing person-to-person variation.

    A paired design is not always possible: you can't give the same patient two different surgeries, or put the same plot of land in two fertiliser trials in the same season. Then two independent groups formed by random assignment are the right design.

    Conditions

    • Random: two independent random samples, or random assignment of individuals to two treatments.
    • 10%: each sample is less than 10% of its population (sampling only).
    • Normal/large sample: for each group, n ≥ 30 or a graph of that group's data shows no strong skewness or outliers.

    For the teaching experiment: random assignment holds; n_A = 25 and n_B = 22 are both below 30, but both dotplots are roughly symmetric with no outliers, so the two-sample t-test is reasonable.

    Also decide α in advance (0.05 unless told otherwise). The scope of the eventual conclusion depends on the design: random assignment allows a cause-and-effect conclusion for subjects like these; independent random samples allow generalising to the two populations but not causation.

    Key terms

    Two-sample t-test
    A significance test comparing the means of two independent groups.
    H₀: μ₁ − μ₂ = 0
    The null hypothesis of no difference between the population means.
    Matched pairs design
    An experiment in which each subject receives both treatments, or subjects are paired and each member of a pair gets a different treatment.
    Unpooled test
    A test that does not assume the two populations have equal standard deviations.

    Common mistakes

    • Defining only 'μ = mean score'.

      Define μ₁ and μ₂ separately, each with its group and context.

    • Using a two-sample test for matched pairs.

      Linked data need a paired test on the differences.

    • Checking normality on the combined data.

      Check each group's graph separately.

    How this topic is tested

    • State both parameters and the order of subtraction.
    • Name the test: 'two-sample t-test for μ₁ − μ₂'.
    • Describe each group's graph for the normal condition when n < 30.

    Practice questions

    Original AP-style multiple-choice questions. Pick an answer to see the explanation.

    1. Question 1 · SP 1 · Formulate Questions

      A nutritionist suspects children who eat breakfast have a higher mean test score than children who don't. Which alternative is correct (B = breakfast, N = no breakfast)?

    2. Question 2 · SP 1 · Formulate Questions

      Twenty people each try two brands of running shoe, in random order, and their times are recorded. Which procedure fits?

    3. Question 3 · SP 2 · Collect Data

      In a two-sample t-test with n₁ = 18 and n₂ = 45, which graphs are needed for the normal condition?

    4. Question 4 · SP 4 · Interpret Results

      Independent random samples of men and women are compared and a significant difference in mean sleep is found. What scope is justified?

    5. Question 5 · SP 2 · Collect Data

      Why is a matched pairs design often more powerful than two independent groups?

    Free-response practice

    Write your answer first, then mark it against the scoring guide.

    Inference (set-up) · 4 points

    A company wants to know whether a new website layout reduces the mean time customers take to complete a purchase. It randomly assigns 60 customers: 30 to the new layout and 30 to the old.

    1. (a) State hypotheses, defining parameters.
    2. (b) Identify the test and verify the conditions.

    Connected topics

    Frequently asked questions

    Why don't we pool for means when we pool for proportions?

    For proportions, H₀ implies equal spreads, so pooling makes sense. For means, equal means don't imply equal standard deviations.

    Do the groups need equal sizes?

    No. Equal sizes help a little with power, but the test works with any sizes.

    What if one group is skewed and small?

    State that the normal condition isn't met for that group and that results may be unreliable.

    How this shows up on the exam42 multiple-choice questions and 4 free-response questions of 10 points. See what each one asks you to do.Full-length AP Statistics practice examsUnit 4 is one of 5 units on the exam. Two timed exams in the 2027 format (42 MCQ + 4 FRQ), with explanations, scoring guides and an estimated 1–5 score. $14.99 · try 5 questions free.

    Free Unit 4 cheat sheet

    Every topic in Unit 4: Inference for Quantitative Data: Means on a few printable pages: the core idea, key terms, the two traps students fall into and what the exam asks.

    We'll use your email to tell you when new AP Statistics practice material is ready. No spam, and we'll delete it if you ask.

    Free Unit 4 practice test: 50 questions with explanations

    All topics in Unit 4: Inference for Quantitative Data: Means

    1. 4.1 Sampling Distributions for Sample Means
    2. 4.2 Constructing a Confidence Interval for a Population Mean or Population Mean Difference
    3. 4.3 Justifying a Claim Based on a Confidence Interval for a Population Mean or Population Mean Difference
    4. 4.4 Setting Up a Test for a Population Mean or Population Mean Difference
    5. 4.5 Carrying Out a Test for a Population Mean or Population Mean Difference
    6. 4.6 Sampling Distributions for the Difference Between Two Sample Means
    7. 4.7 Constructing a Confidence Interval for the Difference Between Two Population Means
    8. 4.8 Justifying a Claim Based on a Confidence Interval for the Difference Between Two Population Means
    9. 4.9 Setting Up a Test for the Difference Between Two Population Means
    10. 4.10 Carrying Out a Test for the Difference Between Two Population Means

    Other units in AP Statistics

    AP® is a trademark registered by College Board, which is not affiliated with, and does not endorse, this website.