Fiveable

📊AP Statistics Unit 7 Review

QR code for AP Statistics practice questions

7.8 Setting Up a Test for the Difference of Two Population Means

7.8 Setting Up a Test for the Difference of Two Population Means

Written by the Fiveable Content Team • Last updated June 2026
Verified for the 2027 exam
Verified for the 2027 examWritten by the Fiveable Content Team • Last updated June 2026
📊AP Statistics
Unit & Topic Study Guides

Previous Exam Prep

AP Cram Sessions 2021

Pep mascot

When you want to know whether two independent groups have different population means, and the data are quantitative, you run a two-sample t-test for a difference of two population means. Setting it up means stating the null and alternative hypotheses in terms of the two population means and checking the conditions for inference before you calculate anything.

Why This Matters for the AP Statistics Exam

This topic is the setup half of a full significance test. When a free-response question asks whether there is convincing evidence that two groups differ on some average measurement, it is asking for a two-sample t-test, not just a comparison of the numbers. The setup work you do here, identifying the procedure, writing correct hypotheses, and checking conditions, is what makes the rest of the test (test statistic, p-value, and conclusion in Topic 7.9) valid.

You will see this on multiple-choice questions that ask you to pick the correct procedure or hypotheses, and on free-response questions where clearly stated hypotheses and verified conditions are important for full, well-communicated work. Hypotheses must be written in terms of population parameters, not sample statistics.

Key Takeaways

  • The correct procedure for comparing two independent group means with unknown population standard deviations is a two-sample t-test for a difference of two population means.
  • The null hypothesis says the two means are equal: H0: μ1 = μ2, which is the same as H0: μ1 - μ2 = 0.
  • The alternative can be one-sided (μ1 < μ2 or μ1 > μ2) or two-sided (μ1 ≠ μ2), depending on the question.
  • Write hypotheses with population parameters and define what μ1 and μ2 mean in context.
  • Check independence (random data collection, plus the 10% condition when sampling without replacement) and approximate normality of the sampling distribution.
  • The normality/shape condition must be checked for BOTH samples.

Choosing the Procedure

Use a two-sample t-test for a difference of two population means when:

  • The variable is quantitative (you are comparing averages, not proportions or categories).
  • You have two independent groups.
  • The population standard deviations are not known, so you use the sample standard deviations s1 and s2.

When you note the test on the exam, be specific and call it a "two-sample t-test for a difference of two population means." If you are using technology, this is usually the "2-Sample T Test" option.

One important distinction: this test is for two independent samples. If each value in one group is naturally paired with a value in the other group (matched pairs), you do not use this procedure. Instead you find the differences within each pair and run a one-sample t-test on those differences. Independent samples versus matched pairs is a common decision point.

Writing the Hypotheses

The null hypothesis says there is no difference between the two population means. The alternative says there is a difference in some direction.

You can write them two equivalent ways:

H0: μ1 = μ2 Ha: μ1 ≠ μ2, or μ1 < μ2, or μ1 > μ2

Or using the difference:

H0: μ1 - μ2 = 0

Ha: μ1 - μ2 ≠ 0, or μ1 - μ2 < 0, or μ1 - μ2 > 0

The difference form lines up with how technology computes the test statistic and p-value (covered in Unit 7.9).

Always define your symbols. Say exactly what μ1 and μ2 represent in the context of the problem, and use population parameters, not sample statistics like x̄1 or x̄2.

Checking the Conditions

Before calculating, verify two things: independence and approximate normality.

Independence

  • Data should come from two independent random samples or a randomized experiment.
  • When sampling without replacement, check the 10% condition for each sample: n1 ≤ 10% of N1 and n2 ≤ 10% of N2.
  • In a randomized experiment, random assignment of treatments is what supports your inference.

If the samples are not random, you cannot safely generalize to the populations, and no calculation can fix that bias.

Normality (Shape)

You need the sampling distribution of x̄1 - x̄2 to be approximately normal. Check this for BOTH samples. Any one of the following supports the shape condition for a sample:

  1. The sample size is greater than 30 (so skewness is not a problem by the Central Limit Theorem).
  2. The population is stated to be normally distributed in the problem.
  3. If the sample size is less than 30, a graph of the sample data (such as a boxplot or histogram) shows no strong skewness and no outliers.

Remember that the shape check applies separately to each of the two samples.

How to Use This on the AP Statistics Exam

MCQ

  • Recognize when a scenario calls for a two-sample t-test for a difference of means versus a one-sample test, a matched-pairs test, or a test for proportions.
  • Spot incorrect hypotheses, such as ones written with x̄ instead of μ, or a one-sided alternative when the question asks whether the means are simply "different."

Free Response

  • State the procedure by name.
  • Write H0 and Ha clearly with population parameters and define μ1 and μ2 in context.
  • Match the alternative to the question. "Different" means a two-sided ≠. "Greater" or "more than" means a one-sided >.
  • List and verify each condition using the actual numbers and context from the problem, and check the shape condition for both samples.

Common Trap

A question that asks whether data provide "convincing evidence" of a difference is asking for a significance test, not just a description of the two means. Set up the full test.

Worked Example

Mr. Fleck runs a green bean farm with two fields. He thinks the fields yield different amounts of crops. He randomly selects 120 days to pick from both fields. Field A yields an average of 580 beans with a standard deviation of 25, and Field B yields an average of 550 beans with a standard deviation of 12. Do the data give convincing evidence that the two fields yield different amounts of beans?

Procedure

Two-sample t-test for a difference of two population means (quantitative variable, two groups, population standard deviations unknown).

Hypotheses

H0: μA = μB Ha: μA ≠ μB

where μA is the true mean daily number of beans from Field A and μB is the true mean daily number of beans from Field B. The alternative is two-sided because the question asks whether the fields yield "different" amounts.

Conditions

  • Random: The days are randomly selected, so both samples are random.
  • Independent: Sampling without replacement is fine here because it is reasonable that there are more than 10 times 120 = 1,200 possible days to pick from each field.
  • Normal: Each sample size is 120, which is greater than 30, so by the Central Limit Theorem the sampling distribution of x̄A - x̄B is approximately normal. This holds for both samples.

With the procedure chosen, hypotheses stated, and conditions verified, you are ready to calculate the test statistic and p-value, which is the next step in Topic 7.9.

Common Misconceptions

  • Using sample statistics in the hypotheses. Hypotheses are always about population parameters (μ1 and μ2), never about x̄1 and x̄2.
  • Confusing independent samples with matched pairs. If the data are paired, find the differences and run a one-sample t-test on them instead of a two-sample test.
  • Forgetting to check normality for both samples. The shape condition must be verified for each group separately, not just one.
  • Picking a one-sided alternative when the question says "different." "Different" is two-sided (≠). Only use < or > when the question points to a specific direction.
  • Thinking a description of the two means is enough. When a prompt asks for "convincing evidence," you must run a significance test, not just compare the averages.
  • Treating the 10% condition as a normality check. The 10% condition supports independence when sampling without replacement; it does not address the shape of the distribution.

Vocabulary

The following words are mentioned explicitly in the College Board Course and Exam Description for this topic.

Term

Definition

alternative hypothesis

The claim that contradicts the null hypothesis, representing what the researcher is trying to find evidence for.

approximately normal

A distribution that closely follows the shape of a normal distribution, allowing for the use of normal probability methods.

difference of population means

The difference between the mean values of two distinct populations, calculated as μ₁ - μ₂.

independence

The condition that observations in a sample are not influenced by each other, typically ensured through random sampling or randomized experiments.

null hypothesis

The initial claim or assumption being tested in a hypothesis test, typically stating that there is no effect or no difference.

outlier

Data points that are unusually small or large relative to the rest of the data.

population means

The average values of two distinct populations being compared, denoted as μ₁ and μ₂.

quantitative variable

A variable that is measured numerically and can take on a range of values, allowing for mathematical operations and statistical analysis.

randomized experiment

A study design where subjects are randomly assigned to treatment groups to establish cause-and-effect relationships.

sampling distribution

The probability distribution of a sample statistic (such as a sample proportion) obtained from repeated sampling of a population.

sampling without replacement

A sampling method in which an item selected from a population cannot be selected again in subsequent draws.

significance test

A statistical procedure used to determine whether there is sufficient evidence to reject the null hypothesis based on sample data.

simple random sample

A sample selected from a population such that every possible sample of the same size has an equal chance of being chosen.

skewness

A measure of the asymmetry of a distribution, indicating whether data is concentrated more on one side of the center.

two-sample t-test

A statistical test used to determine whether there is a significant difference between the means of two independent population samples.

Frequently Asked Questions

When do I use a two-sample t-test for means?

Use a two-sample t-test for means when you are comparing the means of two independent groups, the variable is quantitative, and the population standard deviations are unknown.

How do I write hypotheses for a two-sample t-test?

Write hypotheses with population means, such as H0: mu1 - mu2 = 0. The alternative can be not equal to, less than, or greater than 0 depending on the wording of the question.

What conditions do I check for a two-sample t-test?

Check that the data come from random samples or random assignment, the two groups are independent, the 10% condition is met when sampling without replacement, and the sampling distribution is approximately normal for both groups.

What is the difference between independent samples and matched pairs?

Independent samples compare two separate groups. Matched pairs compare paired observations, so you analyze the differences with a one-sample t-test instead of using a two-sample t-test.

Why should hypotheses use population means instead of sample means?

Significance tests make claims about population parameters. Sample means are evidence from the data, but the hypotheses should be written using mu1 and mu2.

How is two-sample t-test setup tested on AP Statistics?

AP Statistics questions may ask you to identify the correct procedure, write hypotheses in context, verify conditions, avoid matched-pairs mistakes, and prepare for calculating the test statistic and p-value.

Pep mascot
Upgrade your Fiveable account to print any study guide

Download study guides as beautiful PDFs See example

Print or share PDFs with your students

Always prints our latest, updated content

Mark up and annotate as you study

Click below to go to billing portal → update your plan → choose Yearly→ and select "Fiveable Share Plan". Only pay the difference

Plan is open to all students, teachers, parents, etc
Pep mascot
Upgrade your Fiveable account to export vocabulary

Download study guides as beautiful PDFs See example

Print or share PDFs with your students

Always prints our latest, updated content

Mark up and annotate as you study

Plan is open to all students, teachers, parents, etc
report an error
description

screenshots help us find and fix the issue faster (optional)

add screenshot