Setting Up a Test for a Mean
How to choose a one-sample t-test for a population mean or a matched pairs mean difference, define the parameter, write the hypotheses, and check the three conditions.
When \(\sigma\) is unknown, a claim about a population mean is tested with a one-sample t-test for a population mean: \(H_0: \mu = \mu_0\). For a matched pairs design, subtract within each pair and use the same test on the differences: \(H_0: \mu_d = 0\). The conditions are the same as for the t-interval: a random sample or randomized experiment, the 10% condition, and the sample data condition.
1Which procedure, which parameter?
The appropriate test for a population mean with unknown \(\sigma\) is a one-sample t-test for a population mean. For a matched pairs design with two dependent samples, calculate the differences between the paired values to produce one sample of differences, and use a one-sample t-test for the population mean difference. Define the parameter with the response variable and the population, in context; for a mean difference, state the order of subtraction.
Phone batteries
A phone maker advertises a mean battery life of 10 hours under a standard test. A tech club suspects it is lower and tests a random sample of 20 phones from a shipment of 2,000. State the parameter, the hypotheses, and the procedure.
- 1Parameter: \(\mu\) = the true mean battery life (hours) under the standard test for all 2,000 phones in the shipment.
- 2\(H_0: \mu = 10\). \(H_a: \mu \lt 10\), because the club suspects the mean is lower.
- 3\(\sigma\) is unknown, so the procedure is a one-sample t-test for a population mean.
Notifications and reaction time
Thirty students each took a reaction-time test twice, once with phone notifications on and once with them off, in a randomly assigned order. Do notifications slow reactions? Set up the test.
- 1Each student gives two dependent measurements, so subtract within each student: on − off.
- 2Parameter: \(\mu_d\) = the true mean difference in reaction time (milliseconds, on − off) for students like these.
- 3\(H_0: \mu_d = 0\). \(H_a: \mu_d \gt 0\): slower reactions with notifications on make on − off positive.
Three designs
Which designs call for a one-sample t-test on differences?
- 25 students take a reading test in September and again in May.
- 25 randomly chosen students from School A and 25 from School B take the same reading test.
- 15 pairs of twins: one twin in each pair is randomly assigned to a new reading app, the other to the usual program.
- 1Design 1: the same students measured twice. Paired.
- 2Design 2: two separate groups of students with no link between any A student and any B student. Not paired; this calls for a two-sample procedure.
- 3Design 3: each twin pair is a matched pair. Paired.
September and May scores from the same 25 students are linked: a strong reader in September is likely a strong reader in May. Treating them as two independent samples throws away that pairing. Subtract first, then test one list of 25 differences.
2Hypotheses
| Null | One-sided alternatives | Two-sided alternative | |
|---|---|---|---|
| Population mean | \(H_0: \mu = \mu_0\) | \(H_a: \mu \lt \mu_0\) or \(H_a: \mu \gt \mu_0\) | \(H_a: \mu \ne \mu_0\) |
| Mean difference | \(H_0: \mu_d = 0\) | \(H_a: \mu_d \lt 0\) or \(H_a: \mu_d \gt 0\) | \(H_a: \mu_d \ne 0\) |
\(H_0: \bar{x} = 10\) makes no sense: the sample mean is known (9.85). Hypotheses are always about the parameter, \(\mu\) or \(\mu_d\).
The tech club suspected lower battery life before collecting data, so \(H_a: \mu \lt 10\). Picking the side that matches the sample after the fact makes results look stronger than they are. With no direction in the question, use \(\ne\).
3Conditions
| Condition | Check |
|---|---|
| Randomization | A random sample or a randomized experiment |
| 10% condition | When sampling without replacement, \(n \le 10\%N\) |
| Sample data | Population approximately normal, or \(n \ge 30\), or (if \(n \lt 30\)) sample data free from strong skewness and outliers. For matched pairs, apply this to the differences. |
Phone batteries
The 20 battery lives (hours) are 9.2, 9.4, 9.5, 9.5, 9.6, 9.7, 9.7, 9.8, 9.8, 9.8, 9.9, 9.9, 10.0, 10.0, 10.1, 10.1, 10.2, 10.3, 10.4, 10.1. Check the conditions for the t-test.
- 1Randomization: a random sample of phones.
- 210% condition: 20 ≤ 0.10(2,000) = 200.
- 3Sample data condition: \(n = 20 \lt 30\), so look at the data. The dotplot (Figure 3) is roughly symmetric with no outliers.
Pizza delivery
A pizza shop advertises a mean delivery time of 15 minutes. A random sample of 12 deliveries took 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 17 and 34 minutes. Is a t-test for μ appropriate?
- 1\(n = 12 \lt 30\), so the sample data must be free of strong skewness and outliers.
- 2Q1 = 12.5, Q3 = 15.5, IQR = 3. Upper fence: 15.5 + 1.5(3) = 20. The value 34 is an outlier.
“Sample data condition: the sample size of 20 is less than 30, but a dotplot of the battery lives is roughly symmetric with no outliers, so a t-test is reasonable.”
A large sample does not change the population. With \(n \ge 30\) the sampling distribution of \(\bar{x}\) is approximately normal, which is what the t procedures need. The population of reaction-time differences may still be skewed.
Quick reference
| Step | One sample | Matched pairs |
|---|---|---|
| Procedure | One-sample t-test for μ | One-sample t-test for μd |
| Parameter | μ: true mean [variable] for [population] | μd: true mean difference [order] for [population] |
| Hypotheses | H₀: μ = μ₀; Hₐ: <, >, or ≠ μ₀ | H₀: μd = 0; Hₐ: <, >, or ≠ 0 |
| Conditions | Random; 10%; sample data | Same, with the sample data condition on the differences |