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 is unknown (the usual case), the test for a population mean is a one-sample -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 -test for a population mean difference, often called a paired -test, run on those differences.
Situation | Procedure |
One quantitative variable, one sample, claim about the mean | One-sample -test for |
Two linked measurements per subject (or matched pairs), claim about the mean difference | One-sample -test for (paired) |
Two separate, independent groups | Two-sample -test for (Topics 4.9 and 4.10) |
Categorical variable, claim about a proportion | One-sample -test for (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:
- = the true mean amount of soda (mL) in all bottles filled by this machine today.
- = 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 is the status quo or "no effect" claim. It's assumed true unless the data give convincing evidence against it. The alternative hypothesis is the claim the researcher suspects and wants evidence for.
For a population mean
Here is the null hypothesized value of the population mean. The alternative is one of these:
The first two are one-sided alternatives. The last is two-sided.
For a population mean difference
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 = after minus before and you suspect scores go up, the alternative is .
Rules for good hypotheses
- Hypotheses are about parameters (, ), never statistics (, ). You already know . The question is about .
- 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 paired with , but the test is carried out at the boundary value , so is the standard way to write it.
Checking conditions
A one-sample -test for or needs the same three conditions as the -interval in Topic 4.2:
- Randomization condition: the data should be collected using a random sample or a randomized experiment.
- 10% condition: when sampling without replacement, the population size must be at least 10 times the sample size, .
- Sample data condition: the population is approximately normal, or , or (if ) the sample data show no strong skewness and no outliers. For matched pairs, apply this to the differences.

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:

State: she suspects underfilling, so the alternative is one-sided:
where = 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 unknown, so use a one-sample -test for a population mean. Check the conditions:
- Randomization: the 25 bottles were randomly selected from today's production.
- 10%: .
- Sample data: , but the dotplot is roughly symmetric with no outliers, so this condition is met.
All three conditions are met, so a one-sample -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 | |
2 | 295 | 271 | |
3 | 310 | 304 | |
4 | 252 | 234 | |
5 | 281 | 266 | |
6 | 274 | 282 | 8 |
7 | 302 | 290 | |
8 | 289 | 279 | |
9 | 263 | 259 | |
10 | 318 | 291 | |
11 | 277 | 275 | |
12 | 291 | 304 | 13 |
13 | 259 | 270 | 11 |
14 | 284 | 273 |
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:
where = 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 -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.

A one-sample -test on the differences is appropriate. Topic 4.5 finishes this test.
Example 3: Which test?
Name the procedure for each situation.
- 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 -test for a population mean.
- 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 -test for a population mean difference (paired), since each runner gives two linked times.
- 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 -test for . The groups are separate people, so the data aren't paired (Topics 4.9 and 4.10).
- In a random sample of 500 voters, is the proportion who support a ballot measure more than 50%? Answer: a one-sample -test for a population proportion (Unit 3). The variable is categorical, not quantitative.
Common mistakes
- Writing hypotheses with statistics. is wrong; it must be .
- Analyzing paired data with a two-sample test, or the reverse.
- Choosing the direction of after looking at the data.
- Skipping the parameter definition, or defining without the order of subtraction.
- Listing conditions without checking them in context, or using a procedure on a small sample that is strongly skewed or has outliers.
- Switching to a -test because the sample is large. When is unknown, it's a -test at any sample size.