# Setting Up a Test for a Population Mean or Population Mean Difference: AP Statistics Review

Course: AP® Statistics › Unit 4: Inference for Quantitative Data: Means › 4.4 Setting Up a Test for a Population Mean or Population Mean Difference ([course hub](https://www.albert.io/blog/category/test-prep/advanced-placement/ap-statistics.md))
Source: https://www.albert.io/blog/ap-statistics-setting-up-test-population-mean/ · Updated November 16, 2026

Health experts recommend that teenagers get 8 to 10 hours of sleep a night. A principal suspects her students fall short and wants evidence, not a hunch. Before she calculates anything, she has to set up the test: name the parameter, write the hypotheses, and check that a t-test is allowed. A test that is set up wrong cannot be rescued by perfect arithmetic, which is why this setup step gets its own topic.

This article covers **Topic 4.4: Setting Up a Test for a Population Mean or Population Mean Difference** in Unit 4, Inference for Quantitative Data: Means. The topic asks you to choose between a one-sample t-test for a mean and a matched pairs t-test, write the null and alternative hypotheses, and verify the conditions.

By the end, you should be able to:

- Identify when to use a one-sample t-test for \(\mu\) or for \(\mu_d\).
- Define the parameter in context, including the order of subtraction for pairs.
- Write correct one-sided and two-sided hypotheses.
- Verify the randomization, 10%, and sample data conditions.

## Choosing the Test

When the population standard deviation \(\sigma\) is unknown, which is nearly always, the CED calls for a t-test.

![Choosing an inference procedure starts with the type of data and the number of samples.](https://www.albert.io/blog/wp-content/uploads/2026/11/choosing-inference-procedure.png) Choosing an inference procedure starts with the type of data and the number of samples.

| Design | Test | Parameter |
| --- | --- | --- |
| One sample, one quantitative variable | One-sample t-test for a population mean | \(\mu\) |
| Matched pairs: two related measurements per unit | One-sample t-test for a population mean difference | \(\mu_d\) |

Matched pairs come from before-and-after measurements, two treatments on the same person, or naturally paired units such as twins. Subtract within each pair to get one sample of differences. If the two groups are separate people with no pairing, that is a two-sample problem instead.

The parameter must reference the **population**, the **response variable**, and, for pairs, the **order of subtraction**. "\(\mu=\) the mean" is not enough.

## Writing the Hypotheses

![The p-value is the tail area beyond the test statistic, assuming H₀ is true.](https://www.albert.io/blog/wp-content/uploads/2026/11/p-value-tail-area.png) The p-value is the tail area beyond the test statistic, assuming H₀ is true.

| Parameter | Null | One-sided alternatives | Two-sided alternative |
| --- | --- | --- | --- |
| \(\mu\) | \(H_0: \mu=\mu_0\) | \(H_a: \mu\lt \mu_0\) or \(H_a: \mu\gt \mu_0\) | \(H_a: \mu\ne \mu_0\) |
| \(\mu_d\) | \(H_0: \mu_d=0\) | \(H_a: \mu_d\lt 0\) or \(H_a: \mu_d\gt 0\) | \(H_a: \mu_d\ne 0\) |

The direction of \(H_a\) comes from the research question, never from the sample data. Decide it before you look at the results.

## Verifying the Conditions

![What 95% confidence means: about 95% of intervals from repeated samples capture the parameter.](https://www.albert.io/blog/wp-content/uploads/2026/11/confidence-intervals-capture-rate.png) What 95% confidence means: about 95% of intervals from repeated samples capture the parameter.

1. **Randomization:** The data come from a random sample or a randomized experiment.
2. **10% condition:** When sampling without replacement, \(n\le 0.10N\).
3. **Sample data condition:** The population is approximately normal, or \(n\ge 30\), or, if \(n\lt 30\), the sample shows no strong skewness or outliers. For pairs, check the differences.

**Why does this matter?** The conditions make the t-distribution a fair model for the test statistic. If they fail, the p-value you calculate next may be misleading.

## Worked Example 1: One-Sample Setup

The principal surveys a random sample of 40 students from her school of 1,200 about their sleep on school nights.

1. **Test:** One-sample t-test for a population mean.
2. **Parameter:** \(\mu=\) the true mean hours of sleep on school nights for all 1,200 students at this school.
3. **Hypotheses:** \(H_0: \mu=8\) and \(H_a: \mu\lt 8\), because she suspects students sleep *less* than 8 hours.
4. **Conditions:** Random sample. \(40\le 0.10(1200)=120\). And \(n=40\ge 30\).

## Worked Example 2: Matched Pairs Setup

Twelve runners are randomly selected from a club of 300. Each runs a 5K in old shoes and new shoes, in a randomly assigned order. The company claims the new shoes are faster.

1. **Test:** One-sample t-test for a population mean difference.
2. **Parameter:** \(\mu_d=\) the true mean of (old time minus new time), in minutes, for all club runners.
3. **Hypotheses:** \(H_0: \mu_d=0\) and \(H_a: \mu_d\gt 0\). A positive difference means the new shoes are faster.
4. **Conditions:** Random selection and random order. \(12\le 30\). With only 12 differences, a dotplot of them must show no strong skew or outliers, and it does.

Notice how the order of subtraction controls the direction. If you defined \(d=\) new minus old, the same claim would become \(H_a: \mu_d\lt 0\).

## Test-Taking Strategies

### Mnemonic Devices and Memory Shortcuts

For setup, think **"PHC"**: **P**arameter in context, **H**ypotheses with the right direction, **C**onditions checked with numbers.

### Cross-Topic Connections

- [Topic 3.5: Setting Up a Test for a Population Proportion](https://www.albert.io/blog/ap-statistics-setting-up-test-population-proportion/) uses the same setup steps for proportions.
- [Topic 4.2: Constructing a Confidence Interval for a Population Mean](https://www.albert.io/blog/confidence-intervals-what-to-know-for-statistics/) shares these conditions.
- [Topic 4.5: Carrying Out a Test for a Population Mean](https://www.albert.io/blog/ap-statistics-carrying-out-test-population-mean/) finishes these two tests.
- [Topic 4.9: Setting Up a Test for the Difference Between Two Population Means](https://www.albert.io/blog/ap-statistics-setting-up-test-difference-two-means/) covers two independent samples.

### Common Question Formats

- A study description asking whether a one-sample, matched pairs, or two-sample test fits.
- Four sets of hypotheses, asking which matches the research question.
- A free-response part asking you to state and check the conditions.

### Frequent Student Mistakes

- Writing hypotheses with \(\bar{x}\) instead of \(\mu\).
- Treating paired data as two independent samples.
- Saying "\(n\ge 30\), so the data are normal." A large sample makes the sampling distribution approximately normal, not the data.

### Test-Day Shortcuts

Look for the words "each," "before and after," or "same subjects." They usually signal matched pairs.

### Time Management Tips

The May 2027 exam is fully digital in Bluebook: 42 multiple-choice questions in 90 minutes, then 4 free-response questions in 90 minutes. On the inference question, write the parameter and hypotheses first. They take a minute and earn credit even if later steps go wrong.

## Check for Understanding

Think you've got it? Complete the quiz below to make sure. Download your results at the end.

Previous topic: [4.3 Justifying a Claim Based on a Confidence Interval for a Population Mean or Population Mean Difference](https://www.albert.io/blog/ap-statistics-justifying-claim-mean-confidence-interval.md)
Next topic: [4.5 Carrying Out a Test for a Population Mean or Population Mean Difference](https://www.albert.io/blog/ap-statistics-carrying-out-test-population-mean.md)
