Setting Up a Test for a Mean
The mean hypotheses
- A test about a mean pits two claims about $\mu$ against each other.
- Null: $H_0: \mu = \mu_0$ (a specific claimed mean).
- Alternative: $H_a: \mu \ne \mu_0$, or one-sided $\mu > \mu_0$ / $\mu < \mu_0$.
- Choose the alternative from the question, before the data.
The one-sample t-test
- The right procedure is the one-sample $t$-test for a mean.
- It uses the $t$-distribution because $\sigma$ is unknown (estimated by $s_x$).
- Degrees of freedom: $df = n - 1$, as in the interval.
- It's the mean's counterpart to the one-proportion $z$-test.
Verify the conditions
- Check the same three conditions:
- Random, 10% (if without replacement), and normal/large sample.
- Normality: a normal population, or $n \ge 30$, or data with no strong skew/outliers.
- Only then is the $t$-model valid.
The test statistic
- The test statistic measures how far $\bar{x}$ is from $\mu_0$, in standard errors:
-
$$t = \frac{\bar{x} - \mu_0}{s_x/\sqrt{n}}$$
- The denominator is the standard error $s_x/\sqrt{n}$.
- A large $|t|$ means the data are far from what $H_0$ predicts.
The test statistic is a $t$, not a $z$ — the denominator uses the sample SD $s_x$, and you read the p-value from the $t$-distribution at $df = n-1$. Unlike the proportion test (which plugged $p_0$ into the SD), here the mean test just uses $s_x$ from the data. Don't switch to $z$ even if $n$ is large — for a mean with unknown $\sigma$, it's always $t$.
A label claims mean fill $\mu_0 = 500$ mL. A sample of $n = 16$ gives $\bar{x} = 496$ mL, $s_x = 8$ mL.
- $H_0: \mu = 500$, $H_a: \mu < 500$ (we suspect underfilling).
- $df = 15$.
- Test statistic: $t = \dfrac{496 - 500}{8/\sqrt{16}} = \dfrac{-4}{2} = -2$.
A mean test states $H_0: \mu = \mu_0$ vs. a one- or two-sided $H_a$, using the one-sample $t$-test ($df = n-1$) after checking random, 10%, and normal/large sample. The test statistic is $t = \frac{\bar{x} - \mu_0}{s_x/\sqrt{n}}$ — how many standard errors $\bar{x}$ sits from $\mu_0$.
Where the t statistic falls
t measures how far x-bar sits from μ0 in standard errors.
The null hypothesis for a one-mean test has the form...
H0 states a specific claimed mean μ0.
μ0 = 500, x-bar = 496, s = 8, n = 16. Compute t = (x-bar − μ0)/(s/√n).
(496−500)/(8/4) = −4/2 = −2.
For n = 16, what are the degrees of freedom for the one-sample t-test?
df = n − 1 = 15.
For a mean with unknown σ, you should use a z-test if n is large.
It's always a t-test when σ is unknown — even for large n.
The denominator of the one-sample t statistic is...
Use the sample SD over √n; σ is unknown.