AP Statistics · Inference for quantitative data: means
Significance tests for means
1One-sample t-test
$H_0: \mu = \mu_0$ against $H_a: \mu > \mu_0$, $\mu < \mu_0$ or $\mu \ne \mu_0$.
$$t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}, \qquad df = n - 1$$
The P-value is the area in the tail(s) of the t-distribution beyond the observed $t$.
a coffee chain claims its large cups hold 500 mL. A consumer group suspects more than 500 mL is used on average (wasting coffee). A random sample of 25 cups has $\bar{x} = 508$ mL and $s = 20$ mL. Test at $\alpha = 0.05$.
- $H_0: \mu = 500$, $H_a: \mu > 500$, where $\mu$ = the true mean volume of all large cups.
- Conditions: random; 25 < 10% of cups; a dotplot shows no strong skew or outliers.
- $t = \frac{508 - 500}{20/\sqrt{25}} = \frac{8}{4} = 2.0$; $df = 24$.
- P-value $= P(t_{24} \ge 2.0) \approx 0.028$.
- $0.028 < 0.05$: reject $H_0$. There is convincing evidence that the true mean volume exceeds 500 mL.
One-sample t-test for the coffee cups: the P-value is the upper-tail area beyond t = 2.0
Check yourself
For x̄ = 72, μ₀ = 70, s = 6, n = 36, t =
Show the answer
2
2/(6/6).
2Paired t-test
Test $H_0: \mu_d = 0$ using the differences.
12 students take a memory test with and without music. The differences (silence − music) have $\bar{x}_d = 3.2$ and $s_d = 4.1$.
- $H_0: \mu_d = 0$, $H_a: \mu_d > 0$.
- $SE = \frac{4.1}{\sqrt{12}} \approx 1.18$; $t = \frac{3.2}{1.18} \approx 2.70$; $df = 11$.
- P-value $\approx 0.010$.
- Reject $H_0$ at $\alpha = 0.05$: convincing evidence that students score higher in silence, on average. If the order of conditions was randomised, we can conclude music causes lower scores for students like these.
Check yourself
The null hypothesis in a paired t-test is usually:
Show the answer
μ_d = 0
No mean difference.
3Two-sample t-test
$H_0: \mu_1 - \mu_2 = 0$.
$$t = \frac{(\bar{x}_1 - \bar{x}_2) - 0}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}$$
Conditions: two independent random samples (or random assignment to two groups), 10%, Normal/Large Sample for each group. Do not pool variances.
fertiliser A ($n = 15$, $\bar{x} = 42$ cm, $s = 5$) and B ($n = 15$, $\bar{x} = 38$ cm, $s = 6$) are randomly assigned to plants.
- $H_0: \mu_A - \mu_B = 0$, $H_a: \mu_A - \mu_B \ne 0$.
- $SE = \sqrt{\frac{25}{15} + \frac{36}{15}} \approx 2.02$; $t \approx 1.98$.
- With $df \approx 27$ (technology), two-sided P-value ≈ 0.058.
- $0.058 > 0.05$: fail to reject $H_0$. Not convincing evidence of a difference in mean height.
Check yourself
Two-sample t procedures require:
Show the answer
Independent groups
Independence between groups.
4Statistical vs practical significance
A very large sample can make a tiny, unimportant difference statistically significant. Always ask whether the size of the effect matters in context, and report a confidence interval to show it.
with $n = 10{,}000$, a new diet reduces mean weight by 0.2 kg, P-value < 0.001. Statistically significant, but probably of little practical importance.
Check yourself
A huge sample gives P < 0.001 for a 0.1-point improvement in test scores. This shows:
Show the answer
A statistically significant but possibly unimportant difference
Practical vs statistical.
5Going deeper: one-sample, paired and two-sample t tests, worked in full
One-sample t test for a mean: H₀: μ = μ₀.
$$t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}, \qquad \text{df} = n - 1$$
Conditions: Random; 10%; Normal / large sample.
a machine is set to fill bottles with 500 mL. A random sample of 16 bottles has mean 492 mL and standard deviation 12 mL; a dotplot shows no strong skewness or outliers. Is the machine underfilling? Use α = 0.05.
- State: H₀: μ = 500; Hₐ: μ < 500, where μ = the true mean volume of all bottles filled by the machine.
- Plan: one-sample t test. Random: stated. 10%: 16 is less than 10% of all bottles. Normal: dotplot shows no strong skewness or outliers.
- Do: standard error = 12 ÷ √16 = 3. t = (492 − 500) ÷ 3 = −2.67; df = 15. P-value ≈ 0.009 (between 0.005 and 0.01 from the table).
- Conclude: since 0.009 < 0.05, reject H₀. There is convincing evidence that the true mean volume is less than 500 mL.
Interpreting the P-value: "If the true mean were 500 mL, there would be about a 0.009 probability of getting a sample mean of 492 mL or less in a random sample of 16 bottles."
Paired t test: for paired data, compute the differences and test H₀: μ(diff) = 0 with a one-sample t test on the differences.
ten students take a test before and after a tutoring program. The differences (after − before) have mean 2.4 and standard deviation 3.0, with no strong skewness or outliers. Is there evidence of a change, at α = 0.05?
- H₀: μ(diff) = 0; Hₐ: μ(diff) ≠ 0, the true mean change in score.
- t = 2.4 ÷ (3.0 ÷ √10) = 2.4 ÷ 0.949 = 2.53; df = 9.
- Two-sided P-value ≈ 0.032.
- Since 0.032 < 0.05, reject H₀: there is convincing evidence of a change in mean score after tutoring.
- Caution: with no control group, the change cannot be attributed to the tutoring alone.
Two-sample t test: H₀: μ₁ = μ₂ (that is, μ₁ − μ₂ = 0).
$$t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}}$$
Degrees of freedom from technology, or conservatively the smaller of n₁ − 1 and n₂ − 1. Do not pool the standard deviations.
in an experiment, 40 volunteers are randomly assigned to a new study method and 35 to the usual method. The new-method group scores a mean of 78 (s = 8); the usual group 73 (s = 10). Is the new method better, at α = 0.05?
- H₀: μ₁ = μ₂; Hₐ: μ₁ > μ₂, the true mean scores under each method for volunteers like these.
- Conditions: random assignment; both groups have at least 30.
- Standard error = √(64 ÷ 40 + 100 ÷ 35) = 2.11. t = 5 ÷ 2.11 = 2.37.
- Conservative df = 34: one-sided P-value between 0.01 and 0.02 (about 0.012).
- Reject H₀: there is convincing evidence that the new method produces a higher mean score, for volunteers like these. Random assignment supports a causal conclusion.
One-sided and two-sided: a two-sided P-value is twice the one-sided value for the same t. Choose from the question: "different" is two-sided; "greater," "less," "improved" are one-sided.
Tests and confidence intervals agree: a two-sided test at level α rejects H₀: μ = μ₀ exactly when the (1 − α) confidence interval does not contain μ₀. For the bottles, a 95% interval is 492 ± 2.131(3) = (485.6, 498.4), which excludes 500. The interval also shows how much the machine underfills.
Statistical and practical significance: with a very large sample, a difference of 0.2 mL might be statistically significant yet unimportant. Report an interval alongside the test.
Choosing the procedure
- One sample, one mean: one-sample t.
- Two measurements on the same individuals, or matched pairs: paired t.
- Two independent groups: two-sample t.
- Categorical data (proportions): z procedures.
Common mistakes
- Hypotheses about $\bar{x}$.
- Using a two-sample test on paired data.
- Using z in place of t.
- Reporting t without df or a P-value.
- "Accepting" H₀.
- A conclusion without context, or one that claims proof.
- Claiming causation from an observational study.
Check yourself
A one-sample t test gives t = 1.20 with 24 degrees of freedom and a two-sided P-value of 0.24. At α = 0.05 the conclusion is:
Show the answer
Fail to reject H₀; the data do not give convincing evidence that the mean differs from the hypothesized value
A P-value above α means the result could plausibly be due to chance.
6For top marks
- Choose the right procedure: one-sample, paired or two-sample. Look for the design.
- Write hypotheses with the parameter defined: "$\mu_d$ = the true mean difference (silence − music) in score".
- Give $t$, $df$ and the P-value, then compare with $\alpha$.
- Conclude in context, with causal language only for randomised experiments and generalisation only with random samples.
"Because P = 0.058 > 0.05, we fail to reject H₀. We do not have convincing evidence that the mean heights differ for the two fertilisers."
Check yourself
To conclude causation from a t-test we need:
Show the answer
Random assignment of treatments
Experiment.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera