From set-up to decision
In Topic 4.4 you set up a test for a population mean: you defined the parameter, wrote the hypotheses and checked the conditions. This topic finishes the job. You calculate a test statistic, find a p-value, make a decision and write a conclusion.
A complete significance test has four parts. Use them, in this order, in every written answer:
- Hypotheses. Define μ (or μd) in context. State H₀ and Hₐ, and the significance level α.
- Method and conditions. Name the procedure: a one-sample t-test for a population mean or a one-sample t-test for a population mean difference. Check the randomization, 10% and sample data conditions.
- Calculations. Find x̄ and s (or x̄d and sd), the test statistic t, the degrees of freedom and the p-value.
- Conclusion. Compare the p-value with α, state the decision and say what it means in context.
The ideas are the same as the test for a proportion in Topic 3.7. Only the test statistic and the reference distribution change.
The test statistic
The test statistic measures how far the sample mean is from the null value, in standard-error units:
t = (x̄ − μ₀) / (s / √n)
- x̄ is the sample mean and s is the sample standard deviation.
- μ₀ is the value of μ stated in H₀.
- n is the sample size.
- s / √n is the standard error of x̄: an estimate of how much x̄ typically varies from sample to sample.
The sign tells you the direction. A negative t means x̄ is below μ₀; a positive t means x̄ is above μ₀.
Degrees of freedom. If H₀ is true and the conditions are met, t follows a t-distribution with df = n − 1. This is the null distribution of the test statistic.
Matched pairs. The formula is the same, applied to the differences. Use x̄d (the mean of the differences), sd (their standard deviation) and n = the number of pairs. The null value is usually 0, so t = (x̄d − 0) / (sd / √n), with df = n − 1.
Why not z? In a z-test the standard error would use the population standard deviation σ, which you do not know. Replacing σ with s adds extra variability, because s changes from sample to sample. The t-distributions have heavier tails than the standard normal curve to allow for this. As n grows, s becomes a steadier estimate and the t-distribution gets closer to the standard normal.
Finding the p-value
The p-value is the probability, assuming H₀ is true, of getting a test statistic at least as extreme as the one you observed, in the direction of Hₐ. Use the t-distribution with df = n − 1:
| Alternative | p-value | Area under the t-curve |
|---|---|---|
| Hₐ: μ > μ₀ | P(T ≥ t) | right tail beyond t |
| Hₐ: μ < μ₀ | P(T ≤ t) | left tail beyond t |
| Hₐ: μ ≠ μ₀ | 2 × P(T ≥ |t|) | both tails beyond ±|t| |
The same table works for μd, with 0 in place of μ₀.
With technology. The one-sample t-test function takes μ₀, the data (or x̄, s and n) and the direction of Hₐ. It returns t, df and the p-value. A t cdf command with df = n − 1 also gives tail areas. Write the formula with your numbers substituted, because “calculator gives 0.0103” alone does not show your method.
With a t-table. A t-table lists critical values for a few tail areas, so it usually gives a range for the p-value, not an exact value. Find the row for your df, then find the two table values on either side of |t|. If your df is not in the table, use the next smaller df. Worked example 3 shows how.
Interpreting the p-value
A good interpretation of a p-value has three parts:
- The assumption: “Assuming the true mean [variable] of [population] is μ₀…”
- The probability: “…there is a [p-value] probability of getting…”
- The result, in the direction of Hₐ: “…a sample mean of [x̄] or less (or greater, or as far from μ₀ in either direction) in a random sample of n [individuals].”
The p-value is not the probability that H₀ is true. It is calculated by assuming H₀ is true. A small p-value says the data would be unusual in a world where μ = μ₀.
Decision and conclusion
The significance level α is chosen before you look at the data. If none is given, use 0.05 and say so.
- p-value ≤ α: reject H₀. There is convincing statistical evidence for Hₐ.
- p-value > α: fail to reject H₀. There is not convincing statistical evidence for Hₐ.
A full conclusion has three parts:
- Linkage: compare the p-value with α, using both numbers.
- Decision: reject or fail to reject H₀.
- Context in terms of Hₐ: “There is (not) convincing statistical evidence that the true mean [variable] of [population] is [less than / greater than / different from] μ₀.”
Use non-definitive language. A test never proves Hₐ, and failing to reject never shows that H₀ is true. Refer to the parameter (the true or population mean), not to x̄, which you already know. Then use the result to answer the investigative question that started the study: the test is the statistical reasoning behind your answer.
Worked example 1: a one-sided test that rejects H₀
Context (fictional). Ashgrove School wants its students to sleep 8 hours a night on school nights, on average. The wellbeing officer suspects they sleep less. The investigative question is: Do Ashgrove students sleep less than 8 hours a night on school nights, on average? She selects a random sample of 36 of the school’s 1,150 students. Each student records their mean nightly sleep over one school week. The sample gives x̄ = 7.62 hours and s = 0.94 hours. Use α = 0.05.
1. Hypotheses. Let μ = the true mean nightly sleep on school nights (hours) of all Ashgrove students.
- H₀: μ = 8
- Hₐ: μ < 8
- α = 0.05
2. Method and conditions. One-sample t-test for a population mean.
- Randomization: a random sample of students. ✓
- 10%: 36 ≤ 10% of 1,150 = 115. ✓
- Sample data: n = 36 ≥ 30. ✓
3. Calculations.
- Standard error: s / √n = 0.94 / √36 = 0.94 / 6 ≈ 0.15667 hours
- t = (7.62 − 8) / 0.15667 ≈ −2.43, with df = 36 − 1 = 35
- p-value = P(T ≤ −2.43) ≈ 0.0103 (left tail, because Hₐ uses <; see Figure 1, top)
Interpreting the p-value. Assuming the true mean nightly sleep of all Ashgrove students is 8 hours, there is about a 0.0103 probability of getting a sample mean of 7.62 hours or less in a random sample of 36 students.
4. Conclusion. Because the p-value of 0.0103 is less than α = 0.05, we reject H₀. There is convincing statistical evidence that the true mean nightly sleep on school nights of all Ashgrove students is less than 8 hours.
Answer to the investigative question. Yes: the data give convincing evidence that Ashgrove students sleep less than 8 hours a night on school nights, on average.
Check.
- A t-table with no row for df = 35 should be read at df = 30. There, 2.43 lies between 2.147 (tail area 0.02) and 2.457 (tail area 0.01), so 0.01 < p-value < 0.02. This agrees with 0.0103.
- The standard normal curve would give P(Z ≤ −2.43) ≈ 0.0075. That is too small: it ignores the extra variability from using s.
- At α = 0.01 the decision would change: 0.0103 > 0.01, so you would fail to reject H₀. This is why α must be chosen before you see the data.
Worked example 2: a matched-pairs test that fails to reject H₀
Context (fictional). The Skyline weather app forecasts each day’s maximum temperature for the town of Portmere, the evening before. A user asks: Are the app’s forecasts biased, that is, too high or too low on average? She selects a random sample of 10 of last year’s 365 days and records the forecast and the actual maximum (°C). Use α = 0.05.
| Day | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|
| Forecast | 24 | 27 | 22 | 19 | 25 | 30 | 21 | 26 | 23 | 28 |
| Actual | 23.4 | 26.1 | 22.5 | 17.9 | 24.6 | 30.8 | 21.3 | 24.9 | 23.5 | 27.0 |
| d = forecast − actual | 0.6 | 0.9 | −0.5 | 1.1 | 0.4 | −0.8 | −0.3 | 1.1 | −0.5 | 1.0 |
Each day gives two temperatures, so the data are paired and you analyse the differences.
1. Hypotheses. Let μd = the true mean difference (forecast − actual) in maximum temperature, in °C, for all of last year’s days in Portmere.
- H₀: μd = 0
- Hₐ: μd ≠ 0 (“too high or too low” gives a two-sided test)
- α = 0.05
2. Method and conditions. One-sample t-test for a population mean difference.
- Randomization: a random sample of days. ✓
- 10%: 10 ≤ 10% of 365 = 36.5. ✓
- Sample data: only 10 differences, so check them. Ordered: −0.8, −0.5, −0.5, −0.3, 0.4, 0.6, 0.9, 1.0, 1.1, 1.1. Q1 = −0.5, Q3 = 1.0, IQR = 1.5, so the fences are −2.75 and 3.25. No outliers, and no strong skewness. ✓
3. Calculations.
- x̄d = 3.0 / 10 = 0.30 °C and sd ≈ 0.7513 °C
- Standard error: 0.7513 / √10 ≈ 0.2376 °C
- t = (0.30 − 0) / 0.2376 ≈ 1.26, with df = 10 − 1 = 9
- p-value = 2 × P(T ≥ 1.26) ≈ 2 × 0.1192 = 0.2384 (both tails; see Figure 1, bottom)
Interpreting the p-value. Assuming the true mean difference (forecast − actual) over all of last year’s days is 0 °C, there is about a 0.2384 probability of getting a sample mean difference at least 0.30 °C away from 0, in either direction, in a random sample of 10 days.
4. Conclusion. Because the p-value of 0.2384 is greater than α = 0.05, we fail to reject H₀. There is not convincing statistical evidence that the true mean difference (forecast − actual) in maximum temperature for last year’s days in Portmere is different from 0 °C.
Answer to the investigative question. The sample does not give convincing evidence that the app’s forecasts were biased last year. This does not show that they were unbiased: 10 days cannot rule out a small bias in either direction.
Check. A 95% t-interval for μd from the same data is (−0.24, 0.84) °C. It contains 0, which agrees with failing to reject H₀ at α = 0.05 (Topic 4.3).
Worked example 3: bounding a p-value with a t-table
Question. A one-sample t-test with n = 16 and Hₐ: μ ≠ μ₀ gives t = 2.21. Use a t-table to find a range for the p-value, then state the decision at α = 0.05 and at α = 0.01.
- df = 16 − 1 = 15.
- In the df = 15 row, 2.21 lies between 2.131 (upper-tail area 0.025) and 2.249 (upper-tail area 0.02).
- So the one-tail area is between 0.02 and 0.025.
- The test is two-sided, so double: 0.04 < p-value < 0.05. Technology gives 0.0431.
- At α = 0.05: the p-value is less than 0.05, so reject H₀. At α = 0.01: the p-value is greater than 0.01, so fail to reject H₀.
Check. The table range was enough to decide at both levels. If |t| had fallen between two values that straddle α, you would need technology.
Common misconceptions
- Using the standard normal curve. For a mean with σ unknown, the p-value comes from a t-distribution. The normal curve gives p-values that are too small.
- df = n. The degrees of freedom are n − 1. For matched pairs, n is the number of pairs, not the number of measurements.
- Dividing by n or by s alone. The standard error is s / √n.
- Wrong tail. The tail comes from Hₐ, not from the sign of t. If Hₐ is μ > μ₀ and t is negative, the p-value is more than 0.5.
- Forgetting to double for a two-sided test.
- Analysing paired data as two separate samples. Take the differences first.
- “The p-value is the probability that H₀ is true.” It is a probability about the data, calculated by assuming H₀ is true.
- “We accept H₀” or “this proves μ = μ₀”. Failing to reject means the evidence is not convincing, nothing more.
- Concluding about x̄. “The sample mean is less than 8” is not a conclusion. Conclude about μ, the population mean.
- A decision with no linkage. Compare the p-value with α, using both numbers, before you state the decision.
Where this leads
Next you compare two separate groups. Topic 4.6, Sampling Distributions for the Difference Between Two Sample Means, describes how x̄₁ − x̄₂ varies, which leads to intervals and tests for μ₁ − μ₂ later in Unit 4. Try the practice questions now, then use the revision notes and the checklist to consolidate. To review the set-up step, go back to the Topic 4.4 study guide.
Quick questions
Why do I use a t-distribution and not the standard normal curve?
The standard error uses the sample standard deviation s, which changes from sample to sample. That extra variability makes extreme test statistics more likely than the normal curve suggests. The t-distribution with n − 1 degrees of freedom has heavier tails to allow for it.
My t-table has no row for my degrees of freedom. What do I do?
Use the nearest row with fewer degrees of freedom. That gives slightly larger critical values, so your bounds on the p-value are conservative. Technology gives the exact p-value for any df.
Is the test for a mean difference a different test?
No. Once you have one difference per pair, the differences are a single sample. You run a one-sample t-test on them, usually with μ₀ = 0.