From the free course AP Statistics on Lykke

4.5 Carrying Out a Test for a Population Mean or Population Mean Difference

Key concepts: One-sample t-test — comparing x̄ to a claimed μ₀ · t = (x̄ − μ₀) ÷ (s/√n) — effect over standard error · Degrees of freedom n − 1 — because s estimates σ · p-value — chance of a statistic this extreme if H₀ were true · Decision rule: reject H₀ when p ≤ α, otherwise fail to reject · Paired data — test the mean difference x̄_d, not two separate means

Because the population standard deviation ($\sigma$) is almost never known in practice, we substitute the sample standard deviation ($s$), which introduces extra variability.

Because the population standard deviation ($\sigma$) is almost never known in practice, we substitute the sample standard deviation ($s$), which introduces extra variability. This substitution necessitates the use of the t-distribution, which has "heavier tails" than the normal distribution to account for the uncertainty in our estimate of the spread.

The Mechanics of the t-Statistic

The formula for the test statistic in a one-sample t-test (or a paired t-test for a mean difference) is: $$t = \frac{\bar{x} - \mu_0}{\frac{s}{\sqrt{n}}}$$ In this ratio, the numerator represents the observed effect—the "signal"—while the denominator represents the standard error of the mean—the "noise." This $t$-value follows a t-distribution with degrees of freedom ($df$) equal to $n - 1$. As the sample size $n$ increases, the t-distribution approaches the standard normal ($z$) distribution because the estimate of the population variability ($s$) becomes more precise.

For a matched pairs design, the calculation is identical, but the data set consists of the differences ($d$) between paired observations. In this case, $\bar{x}$ becomes $\bar{x}_d$ (the mean of the differences), $s$ becomes $s_d$ (the standard deviation of the differences), and $n$ is the number of pairs.

Determining the p-Value

The p-value is the probability of observing a test statistic at least as extreme as the one calculated, assuming the null hypothesis ($H_0$) is true. It quantifies the compatibility between the observed data and the null model. The direction of the "extreme" values depends on the alternative hypothesis ($H_a$):

  • Greater than ($\mu > \mu_0$): The p-value is the area to the right of the calculated $t$ under the $t$-distribution curve.
  • Less than ($\mu < \mu_0$): The p-value is the area to the left of the calculated $t$.
  • Not equal to ($\mu \neq \mu_0$): The p-value is the sum of the areas in both tails (twice the area of the tail beyond the calculated $t$).

Key Insight: The p-value is a conditional probability: $P(\text{data or more extreme} \mid H_0 \text{ is true})$. It is not the probability that the null hypothesis is true, nor is it the probability that the results occurred by chance.

Justifying a Claim

To reach a statistical conclusion, the p-value is compared to a pre-defined significance level ($\alpha$). This comparison dictates whether the observed results are "statistically significant."

P-value Comparison Statistical Decision Contextual Conclusion
p-value $\le \alpha$ Reject $H_0$ There is convincing evidence for $H_a$.
p-value $> \alpha$ Fail to reject $H_0$ There is not convincing evidence for $H_a$.

A complete conclusion must be stated in context, referring to the specific population and parameter being tested. It should use non-definitive language (e.g., "the data suggest" or "there is evidence") rather than claiming the results "prove" a hypothesis.

Misconception Check: "Accepting" the Null

A common error is stating that we "accept the null hypothesis" when the p-value is large. In statistics, we never accept $H_0$. A large p-value simply means the data are consistent with the null hypothesis; it does not prove the null is true. It is like a "not guilty" verdict in a trial—it doesn't mean the defendant is innocent, only that there wasn't enough evidence to convict.

Worked Example: Battery Longevity

A manufacturer claims their new "Ultra" battery lasts for a mean of 50 hours. A consumer group suspects the mean life is actually lower. They test a random sample of 36 batteries and find a sample mean of $\bar{x} = 48.5$ hours with a sample standard deviation of $s = 4$ hours. Using $\alpha = 0.05$:

  1. Calculate $t$: $t = \frac{48.5 - 50}{4 / \sqrt{36}} = \frac{-1.5}{0.667} = -2.25$.
  2. Find p-value: With $df = 35$, the area to the left of $t = -2.25$ is approximately $0.015$.
  3. Conclude: Since $0.015 \le 0.05$, we reject $H_0$. There is convincing evidence that the true mean life of these batteries is less than 50 hours.

Interpretation Check: A researcher performs a paired t-test on the heart rates of 20 subjects before and after exercise. The test yields a p-value of 0.08. Using a significance level of $\alpha = 0.05$, what is the most appropriate conclusion?

  • (A) Reject $H_0$; there is evidence that exercise changes heart rate.
  • (B) Fail to reject $H_0$; there is evidence that exercise does not change heart rate.
  • (C) Fail to reject $H_0$; there is not convincing evidence that exercise changes heart rate.
  • (D) Accept $H_0$; the mean difference in heart rate is zero.

Correct Answer: (C). We do not "accept" the null or claim evidence for it; we simply state that the evidence for the change is insufficient at the 5% level.

4.5 Carrying Out a Test for a Population Mean or Population Mean Difference - AP Statistics - image 1
4.5 Carrying Out a Test for a Population Mean or Population Mean Difference - AP Statistics - image 1
4.5 Carrying Out a Test for a Population Mean or Population Mean Difference - AP Statistics - diagram 1
4.5 Carrying Out a Test for a Population Mean or Population Mean Difference - AP Statistics - diagram 1

Source Materials

The whole course on Lykke · Browse all public course wikis