Dove's LibraryDove's Library

4.4 - Setting Up a Test for a Population Mean or Population Mean Difference

Overview

A confidence interval estimates a mean. A significance test checks a specific claim about it: is there convincing evidence that the population mean is different from some value? This topic covers the setup: choosing the right test, defining the parameter, writing the hypotheses, and checking the conditions. Topic 4.5 carries the test out.

Choosing the test

When the variable is quantitative and the population standard deviation σ\sigma is unknown (the usual case), the test for a population mean is a one-sample tt-test for a population mean.
For a matched pairs design (two dependent samples, like before and after measurements on the same people), find the difference for each pair to get one sample of differences. The test is then a one-sample tt-test for a population mean difference, often called a paired tt-test, run on those differences.
Situation
Procedure
One quantitative variable, one sample, claim about the mean
One-sample tt-test for μ\mu
Two linked measurements per subject (or matched pairs), claim about the mean difference
One-sample tt-test for μd\mu_d (paired)
Two separate, independent groups
Two-sample tt-test for μ1−μ2\mu_1 - \mu_2 (Topics 4.9 and 4.10)
Categorical variable, claim about a proportion
One-sample zz-test for pp (Unit 3)
For paired versus two-sample, ask: is each value in one group linked to one specific value in the other? If you could draw a line from each "before" to its own "after," the data are paired.

Defining the parameter

State the parameter in words with three parts: the parameter (mean or mean difference), the response variable, and the population. For example:
  • μ\mu = the true mean amount of soda (mL) in all bottles filled by this machine today.
  • μd\mu_d = the true mean difference in reaction time (caffeine minus placebo, in ms) for adults like the volunteers in this study.

Writing the hypotheses

The null hypothesis H0H_0 is the status quo or "no effect" claim. It's assumed true unless the data give convincing evidence against it. The alternative hypothesis HaH_a is the claim the researcher suspects and wants evidence for.

For a population mean

H0:μ=μ0H_0: \mu = \mu_0
Here μ0\mu_0 is the null hypothesized value of the population mean. The alternative is one of these:
Ha:μ<μ0Ha:μ>μ0Ha:μ≠μ0H_a: \mu < \mu_0 \qquad H_a: \mu > \mu_0 \qquad H_a: \mu \ne \mu_0
The first two are one-sided alternatives. The last is two-sided.

For a population mean difference

H0:μd=0H_0: \mu_d = 0Ha:μd<0Ha:μd>0Ha:μd≠0H_a: \mu_d < 0 \qquad H_a: \mu_d > 0 \qquad H_a: \mu_d \ne 0
The null says there is no difference on average. The direction of a one-sided alternative depends on the order of subtraction, so decide the order first. If dd = after minus before and you suspect scores go up, the alternative is Ha:μd>0H_a: \mu_d > 0.

Rules for good hypotheses

  • Hypotheses are about parameters (μ\mu, μd\mu_d), never statistics (xˉ\bar{x}, xˉd\bar{x}_d). You already know xˉ\bar{x}. The question is about μ\mu.
  • Choose one-sided or two-sided from the research question, before looking at the data. Words like "less than," "more than," "increase," or "reduce" point to one-sided. Words like "different," "changes," or "affects" point to two-sided.
  • The null always contains the equality. You may see H0:μ≥500H_0: \mu \ge 500 paired with Ha:μ<500H_a: \mu < 500, but the test is carried out at the boundary value μ=500\mu = 500, so H0:μ=500H_0: \mu = 500 is the standard way to write it.

Checking conditions

A one-sample tt-test for μ\mu or μd\mu_d needs the same three conditions as the tt-interval in Topic 4.2:
  1. Randomization condition: the data should be collected using a random sample or a randomized experiment.
  1. 10% condition: when sampling without replacement, the population size must be at least 10 times the sample size, n≤10%Nn \le 10\%N.
  1. Sample data condition: the population is approximately normal, or n≥30n \ge 30, or (if n<30n < 30) the sample data show no strong skewness and no outliers. For matched pairs, apply this to the differences.
4.4 - Setting Up a Test for a Population Mean or Population Mean Difference
Name each condition and tie it to the problem. "Randomization: the 25 bottles were randomly selected from today's production" earns credit; "the data are random" doesn't. Don't swap the conditions either: the 10% condition isn't about randomness, and the sample data condition isn't about how the data were collected.
In a randomized experiment with volunteers, nobody is sampled without replacement from a population, so the 10% condition doesn't apply. Random assignment satisfies the randomization condition, but the results only generalize to people like the volunteers.

Example 1: Are bottles underfilled?

A bottling machine is supposed to fill soda bottles with 500 mL on average. A quality-control inspector worries that the machine is underfilling, so she randomly selects 25 of the 8,000 bottles filled today and measures the amount of soda in each. Set up a test for her question. Here is a dotplot of the 25 amounts:
4.4 - Setting Up a Test for a Population Mean or Population Mean Difference
State: she suspects underfilling, so the alternative is one-sided:
H0:μ=500Ha:μ<500H_0: \mu = 500 \qquad H_a: \mu < 500
where μ\mu = the true mean amount of soda (mL) in all bottles filled by this machine today.
Plan: one quantitative variable (amount of soda), one sample, and σ\sigma unknown, so use a one-sample tt-test for a population mean. Check the conditions:
  • Randomization: the 25 bottles were randomly selected from today's production.
  • 10%: 25≤10%(8,000)=80025 \le 10\%(8{,}000) = 800.
  • Sample data: n=25<30n = 25 < 30, but the dotplot is roughly symmetric with no outliers, so this condition is met.
All three conditions are met, so a one-sample tt-test is appropriate. Topic 4.5 finishes this test.

Example 2: Caffeine and reaction time (matched pairs)

A researcher recruits 14 adult volunteers. Each volunteer takes a reaction-time test twice, on different days: once an hour after a caffeine pill and once an hour after an identical-looking placebo pill. A coin flip decides which pill each person gets first. The reaction times (ms) are:
Volunteer
Placebo
Caffeine
Difference (caffeine minus placebo)
1
268
235
−33-33
2
295
271
−24-24
3
310
304
−6-6
4
252
234
−18-18
5
281
266
−15-15
6
274
282
8
7
302
290
−12-12
8
289
279
−10-10
9
263
259
−4-4
10
318
291
−27-27
11
277
275
−2-2
12
291
304
13
13
259
270
11
14
284
273
−11-11
The researcher wants to know whether caffeine changes mean reaction time. Set up a test.
State: the question asks whether caffeine changes reaction time and gives no direction, so the test is two-sided:
H0:μd=0Ha:μd≠0H_0: \mu_d = 0 \qquad H_a: \mu_d \ne 0
where μd\mu_d = the true mean difference in reaction time (caffeine minus placebo, in ms) for adults like these volunteers.
Plan: each volunteer gives two linked measurements, so this is a matched pairs design. Use a one-sample tt-test for a population mean difference on the 14 differences. Check the conditions:
  • Randomization: the order of the two pills was randomly assigned for each volunteer. (The volunteers weren't a random sample, so the results apply to adults like them, not to all adults.)
  • 10%: doesn't apply. This is an experiment, not a sample drawn without replacement from a population.
  • Sample data: there are only 14 differences, so graph them. The dotplot of the differences is roughly symmetric with no outliers.
4.4 - Setting Up a Test for a Population Mean or Population Mean Difference
A one-sample tt-test on the differences is appropriate. Topic 4.5 finishes this test.

Example 3: Which test?

Name the procedure for each situation.
  1. A random sample of 40 college students reports their hours of sleep per week. Is the mean less than 56 hours? Answer: a one-sample tt-test for a population mean.
  1. Twenty runners each run a mile on a track and on a treadmill, in random order. Is there a mean difference in their times? Answer: a one-sample tt-test for a population mean difference (paired), since each runner gives two linked times.
  1. Forty patients are randomly assigned, 20 each, to a new drug or a standard drug, and the drop in blood pressure is recorded. Does the new drug work better? Answer: a two-sample tt-test for μ1−μ2\mu_1 - \mu_2. The groups are separate people, so the data aren't paired (Topics 4.9 and 4.10).
  1. In a random sample of 500 voters, is the proportion who support a ballot measure more than 50%? Answer: a one-sample zz-test for a population proportion (Unit 3). The variable is categorical, not quantitative.

Common mistakes

  • Writing hypotheses with statistics. H0:xˉ=500H_0: \bar{x} = 500 is wrong; it must be H0:μ=500H_0: \mu = 500.
  • Analyzing paired data with a two-sample test, or the reverse.
  • Choosing the direction of HaH_a after looking at the data.
  • Skipping the parameter definition, or defining μd\mu_d without the order of subtraction.
  • Listing conditions without checking them in context, or using a tt procedure on a small sample that is strongly skewed or has outliers.
  • Switching to a zz-test because the sample is large. When σ\sigma is unknown, it's a tt-test at any sample size.

AP® is a registered trademark of the College Board, which is not affiliated with Dove's Library and was not involved in the production of, and does not endorse, this website.

Providing free, high-quality AP notes to help students succeed, earn college credit, and reach their educational goals, ensuring everyone has access to the resources they need.

© 2026 Standard Learning Group, Inc., which operates Dove's Library. All rights reserved.