PrepGo

Setting Up a Test for the Difference of Two Population Means - AP Statistics Study Guide

Written by AP Content Team, Verified for 2026 AP Exams, Last updated: May 2026

Learn with study guides reviewed by top AP teachers. This guide takes about 18 minutes to read.

Quick Summary

This guide will equip you to set up a significance test for the difference between two population means. You will learn to identify the correct statistical test, define the parameters of interest, formulate the null and alternative hypotheses, and meticulously verify all necessary conditions for inference. Mastering these foundational "State" and "Plan" steps is critical for successfully conducting a full two-sample t-test.

Key Concepts

When we want to compare the average (mean) of a quantitative variable between two distinct, independent groups, we use a two-sample t-test for a difference of two population means. This procedure allows us to determine if an observed difference in sample means is statistically significant enough to conclude there is a real difference between the population means.

1. Identifying the Correct Procedure

You should use this test when the following are true:

  • Goal: You are comparing the means of two populations.

  • Data Type: The data is quantitative (e.g., height, weight, test scores, time).

  • Samples: The data comes from two independent groups. This means the selection of individuals or objects for one sample does not influence the selection for the other sample. This is a crucial distinction from a paired-data t-test where data points are linked.

  • Parameters: The population standard deviations (σ₁ and σ₂) are unknown, which is almost always the case in practice. We will use the sample standard deviations (s₁ and s₂) to estimate them.

2. Stating Hypotheses

The first step in any test is to define the parameters and state the hypotheses.

  • Parameters:

    • μ₁: The true mean of the first population.

    • μ₂: The true mean of the second population.

    • Always define these parameters in the context of the problem. For example, "Let μ₁ = the true mean GPA of all seniors at North High School."

  • Null Hypothesis (H₀):

    • The null hypothesis always states that there is no difference between the population means. It is a statement of equality.

    • H₀: μ₁ - μ₂ = 0 or, equivalently, H₀: μ₁ = μ₂

  • Alternative Hypothesis (Hₐ):

    • The alternative hypothesis is what we are trying to find evidence for. It can be one-sided or two-sided.

    • Two-Sided: States there is some difference, but doesn't specify the direction. Use this when the prompt asks if there is a "difference," "change," or "effect."

      • Hₐ: μ₁ - μ₂ \neq 0 or Hₐ: μ₁ \neq μ₂
    • One-Sided (Greater Than): States the first mean is greater than the second. Use this when the prompt asks if μ₁ is "greater than," "more than," or "has increased."

      • Hₐ: μ₁ - μ₂ > 0 or Hₐ: μ₁ > μ₂
    • One-Sided (Less Than): States the first mean is less than the second. Use this when the prompt asks if μ₁ is "less than," "smaller than," or "has decreased."

      • Hₐ: μ₁ - μ₂ < 0 or Hₐ: μ₁ < μ₂

3. Verifying Conditions for Inference

Before you can perform the calculations for the test, you must verify three conditions. Each condition must be checked for both groups.

  • 1. Random Condition:

    • The data must come from two independent random samples or from two groups in a randomized experiment.

    • How to check: Look for keywords in the problem description like "random sample," "randomly selected," "randomly assigned," or "randomized experiment." State that the samples were selected randomly.

  • 2. 10% Condition (Independence within samples):

    • This condition is only necessary when you are sampling without replacement from a finite population. It is not needed for experiments.

    • The sample size for each group should be no more than 10% of its respective population size. This ensures that individual observations within a sample can be treated as independent.

    • Formula:n₁ \le (1/10)N₁ and n₂ \le (1/10)N₂, where N is the population size.

    • How to check: State that it's reasonable to assume the population of group 1 is at least 10 * n₁ and the population of group 2 is at least 10 * n₂. For example, "It is reasonable to assume there are at least 300 male students (10 * 30) and 350 female students (10 * 35) at the university."

  • 3. Normal/Large Sample Condition:

    • This condition ensures that the sampling distribution of the difference in sample means (x̄₁ - x̄₂) is approximately Normal. You only need to satisfy one of the following pathways for each group:

      • (a) Populations are Normal: The problem explicitly states that the populations from which the samples are drawn are normally distributed.

      • (b) Large Samples (Central Limit Theorem, CLT): Both sample sizes are large enough (n₁ \ge 30 and n₂ \ge 30). The CLT states that for large n, the sampling distribution will be approximately Normal regardless of the population's shape.

      • (c) Graph the Sample Data: If the sample sizes are small (n₁ < 30 or n₂ < 30) and the population distribution is unknown, you must graph the sample data for both groups (e.g., using a boxplot, dotplot, or histogram). If the graphs show no strong skewness and no outliers, it is reasonable to proceed as if the underlying populations are approximately Normal.

    • How to check: Address the condition for both samples. For example: "Since n₁ = 45 \ge 30 and n₂ = 50 \ge 30, the Normal/Large Sample condition is met for both groups by the Central Limit Theorem." Or, for small samples: "The boxplots of the sample data for both groups (sketch shown) do not reveal strong skewness or outliers, so we can assume the underlying populations are approximately Normal."

[Image: A flowchart showing the three pathways to check the Normal/Large Sample condition for two samples.]

Key Vocabulary

  • Two-Sample t-test for a difference of means: A significance test used to determine if there is convincing evidence of a difference between the means of two independent populations.

  • Independent Samples: Samples where the selection of individuals for one group has no effect on the selection of individuals for the other group.

  • Null Hypothesis (H₀): The hypothesis of no effect or no difference, typically stating that the difference between the two population means is zero (μ₁ - μ₂ = 0).

  • Alternative Hypothesis (Hₐ): The hypothesis that we are trying to find evidence for, stating that there is a difference between the population means (μ₁ - μ₂ \neq 0, > 0, or < 0).

  • Degrees of Freedom (df): For a two-sample t-test, the degrees of freedom are calculated using a complex formula (often done by calculator) or approximated by the smaller of n₁ - 1 and n₂ - 1. It defines the specific t-distribution used for the test.

Calculator Tech (TI-84)

While the main function is for the "Do" step (Topic 7.9), your calculator is essential for checking the Normal/Large Sample condition when you have raw data and small sample sizes.

Goal: Create side-by-side boxplots to check for strong skewness or outliers.

Example: You have data for Group 1 (n=15) and Group 2 (n=18).

  1. Enter Data into Lists:

    • Press STAT -> 1:Edit....

    • Enter all data for Group 1 into list L1.

    • Enter all data for Group 2 into list L2.

  2. Set up the Boxplots:

    • Press 2nd -> Y= [STAT PLOT].

    • Select 1:Plot1....

    • Turn the plot On.

    • For Type, select the boxplot icon that shows outliers (the first one in the second row).

    • Set Xlist:L1 (Press 2nd -> ).

    • Set Freq:.

    • Select 2:Plot2....

    • Turn the plot On.

    • For Type, select the same boxplot icon.

    • Set Xlist:L2 (Press 2nd -> ).

    • Set Freq:.

  3. Display the Graph:

    • Press ZOOM -> 9:ZoomStat.

    • The calculator will display both boxplots on the same screen. You can now visually inspect them for strong skewness (if the median is far to one side of the box and whiskers are very different lengths) or outliers (shown as separate points).

How to Show Work on the FRQ

To receive full credit for setting up a significance test on the AP exam, you must clearly communicate the "State" and "Plan" steps of the four-step inference process.

The "State" and "Plan" Template

STATE:

  1. Parameters: Define the two population means, μ₁ and μ₂, in the context of the problem.

    • Template: "Let μ₁ = the true mean [response variable] for [group 1]. Let μ₂ = the true mean [response variable] for [group 2]."
  2. Hypotheses: State the null and alternative hypotheses using proper symbols.

    • Template:

      • H₀: μ₁ - μ₂ = 0 (or H₀: μ₁ = μ₂)

      • Hₐ: μ₁ - μ₂ [\neq, >, or <] 0 (or Hₐ: μ₁ [\neq, >, or <] μ₂)

  3. Significance Level: State the alpha (α) level. If not given, use α = 0.05.

    • Template: "We will use a significance level of α = 0.05."

PLAN:

  1. Name the Procedure: Identify the test you will use.

    • Template: "The appropriate procedure is a two-sample t-test for a difference of population means."
  2. Check the Conditions: Check the three conditions, making sure to connect each one to the specifics of the problem.

    • Random:Template: "The problem states that the data come from two independent random samples [OR two groups in a randomized experiment]."

    • 10% Condition:Template: (If sampling without replacement) "We must assume the population of [group 1] is at least 10 * n₁ = [value] and the population of [group 2] is at least 10 * n₂ = [value]. This is reasonable to assume."

    • Normal/Large Sample:Template (choose one path per sample):

      • (CLT Path): "Since n₁ = [value] \ge 30 and n₂ = [value] \ge 30, the Normal/Large Sample condition is met for both groups by the CLT."

      • (Given Normal Path): "The problem states that both populations are approximately Normal."

      • (Graphing Path): "Since n₁ = [value] < 30 and n₂ = [value] < 30, we must graph the sample data. A sketch of the boxplots shows no strong skewness or outliers for either group, so we can proceed."

Practice Problems

Problem 1:

A guidance counselor wants to know if there is a difference in the mean number of hours spent studying per week between male and female students at a large high school. She takes a random sample of 40 male students and an independent random sample of 45 female students. The male students had a mean of 8.5 hours with a standard deviation of 2.1 hours. The female students had a mean of 9.2 hours with a standard deviation of 2.5 hours. State the hypotheses and check the conditions for a significance test to determine if there is a difference. Use α = 0.05.

Solution:

STATE:

  • Parameters:

    • Let μ₁ = the true mean number of hours spent studying per week for all male students at this high school.

    • Let μ₂ = the true mean number of hours spent studying per week for all female students at this high school.

  • Hypotheses:

    • H₀: μ₁ - μ₂ = 0

    • Hₐ: μ₁ - μ₂ \neq 0

  • Significance Level:

    • We will use a significance level of α = 0.05.

PLAN:

  • Name the Procedure: The appropriate procedure is a two-sample t-test for a difference of population means.

  • Check the Conditions:

    • Random: The problem states the data come from a "random sample of 40 male students and an independent random sample of 45 female students."

    • 10% Condition: It is reasonable to assume there are at least 10 * 40 = 400 male students and at least 10 * 45 = 450 female students at this "large high school."

    • Normal/Large Sample: Since the sample sizes n₁ = 40 \ge 30 and n₂ = 45 \ge 30, the Normal/Large Sample condition is met for both groups by the Central Limit Theorem.

Problem 2:

A researcher believes a new fertilizer will result in a higher mean yield for tomato plants. She randomly assigns 12 young tomato plants to receive the new fertilizer (Group A) and 10 young tomato plants to receive the standard fertilizer (Group B). After two months, she records the yield in pounds for each plant. The data are shown below.

  • Group A (New): 10.1, 11.5, 9.8, 12.0, 13.1, 10.9, 11.8, 12.5, 11.2, 10.5, 12.2, 11.1

  • Group B (Standard): 9.5, 10.2, 8.8, 9.9, 10.5, 11.0, 9.1, 10.0, 8.5, 9.7

Set up a significance test to determine if the new fertilizer results in a higher mean yield.

Solution:

STATE:

  • Parameters:

    • Let μ₁ = the true mean yield (in pounds) of all tomato plants that could be treated with the new fertilizer.

    • Let μ₂ = the true mean yield (in pounds) of all tomato plants that could be treated with the standard fertilizer.

  • Hypotheses:

    • H₀: μ₁ - μ₂ = 0

    • Hₐ: μ₁ - μ₂ > 0

  • Significance Level:

    • Since no significance level is given, we will use α = 0.05.

PLAN:

  • Name the Procedure: The appropriate procedure is a two-sample t-test for a difference of population means.

  • Check the Conditions:

    • Random: The problem states the plants were "randomly assigned" to the two fertilizer groups. This is a randomized experiment.

    • 10% Condition: This condition is not applicable because this is an experiment, not sampling from a finite population.

    • Normal/Large Sample: The sample sizes are small (n₁ = 12 < 30 and n₂ = 10 < 30), so we must graph the data.

    [Image: A sketch of two side-by-side boxplots for Group A and Group B data.]

    The boxplots of the sample data for both the new fertilizer and standard fertilizer groups show no strong skewness and no outliers. Therefore, it is reasonable to assume the underlying distributions of yields are approximately Normal.

Common Mistakes to Avoid

  • Confusing Independent vs. Paired Data: This is the most common error. A two-sample test is for two independent groups (e.g., men vs. women, treatment vs. control). If the data consists of two measurements on the same subject (e.g., pre-test and post-test score) or on matched subjects, you must use a paired t-test.

  • Using Sample Statistics in Hypotheses: Hypotheses are always about population parameters (μ₁, μ₂). Never write hypotheses using sample statistics (e.g., H₀: x̄₁ - x̄₂ = 0). The entire point of the test is to use sample data to make an inference about the unknown population parameters.

  • Checking Conditions for Only One Group: You must explicitly state and verify the conditions for both samples. For example, when checking the Normal/Large Sample condition, you must show that both n₁ and n₂ are \ge 30, or that graphs for both samples look acceptable.

  • Failing to Graph Data for Small Samples: If n < 30 for either group and the population distribution is unknown, you must make a graph (boxplot or dotplot) of the sample data and comment on its shape. Simply stating "n < 30, condition not met" is incorrect and will lose points. You must show you know the alternative way to check the condition.