Suppose a population is modelled by $X \sim \mathrm{N}(\mu,\ \sigma^2)$ and we take a random sample $X_1, X_2, \ldots, X_n$. The sample mean $\bar{X} = \dfrac{X_1 + X_2 + \cdots + X_n}{n}$ is itself a random variable โ a different sample gives a different mean.
standard deviation of $\bar{X}$: $\dfrac{\sigma}{\sqrt{n}}$
The lengths of bolts are $X \sim \mathrm{N}(25,\ 0.8^2)$ mm. A random sample of $16$ bolts is taken. Find $\mathrm{P}(\bar{X} > 25.4)$, and compare with $\mathrm{P}(X > 25.4)$ for a single bolt.
The structure is exactly the one you used for binomial tests in Year 1 (Binomial Hypothesis Tests); only the distribution changes. The standard deviation $\sigma$ is assumed known and unchanged; the test is about the mean.
Under $\mathrm{H}_0$: $\bar{X} \sim \mathrm{N}\!\left(\mu_0,\ \dfrac{\sigma^2}{n}\right)$ test statistic $z = \dfrac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}$
| Significance level | One tail: critical $z$ | Two tails: critical $z$ |
|---|---|---|
| $10\%$ | $1.2816$ | $\pm 1.6449$ |
| $5\%$ | $1.6449$ | $\pm 1.9600$ |
| $2.5\%$ | $1.9600$ | $\pm 2.2414$ |
| $1\%$ | $2.3263$ | $\pm 2.5758$ |
There are three equivalent ways to reach a decision โ use whichever the question asks for:
- $p$-value: find $\mathrm{P}(\bar{X} \geqslant \bar{x})$ (or $\leqslant$) under $\mathrm{H}_0$ and compare with the significance level (for a two-tailed test, compare with half the level).
- Test statistic: compare $z$ with the critical $z$-value.
- Critical region: find the values of $\bar{x}$ that would lead to rejection, then see whether the observed $\bar{x}$ lies in it.
Bolt lengths are normally distributed with standard deviation $0.8$ mm, and should have mean $25$ mm. An engineer suspects the machine now makes bolts that are too long. A random sample of $16$ bolts has mean $25.4$ mm. Test at the $5\%$ level.
Battery lifetimes are normally distributed with mean $220$ hours and standard deviation $15$ hours. A new production method is thought to reduce the mean lifetime. A sample of $25$ new batteries has mean $214.5$ hours. Test at the $2.5\%$ level, assuming the standard deviation is unchanged.
A machine fills cans with a volume that is normally distributed with standard deviation $4$ ml. The mean is meant to be $330$ ml. A sample of $20$ cans has mean $331.9$ ml. (a) Find the critical region for a two-tailed test at the $5\%$ level. (b) Carry out the test.
For the bolts ($\sigma = 0.8$, $\mathrm{H}_0: \mu = 25$, $\mathrm{H}_1: \mu > 25$, $5\%$ level), find the smallest sample size for which a sample mean of $25.3$ would be significant.
| Assumption | Why it matters |
|---|---|
| The population is normally distributed | Makes $\bar{X}$ exactly normal. (For large $n$, $\bar{X}$ is approximately normal anyway.) |
| $\sigma$ is known and unchanged | The test uses $\sigma/\sqrt{n}$; if a change of process alters the spread as well as the mean, the test is unreliable. |
| The sample is random | Observations must be independent and representative, e.g. not all from one batch. |
Sample mean
$\bar{X} \sim \mathrm{N}\!\left(\mu,\ \dfrac{\sigma^2}{n}\right)$
Test statistic
$z = \dfrac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}$
Hypotheses
About the population mean $\mu$; $\mathrm{H}_0: \mu = \mu_0$.
$5\%$ critical $z$
One tail $1.6449$; two tails $\pm 1.96$.
$1\%$ critical $z$
One tail $2.3263$; two tails $\pm 2.5758$.
Critical region
$\bar{x} \geqslant \mu_0 + z\dfrac{\sigma}{\sqrt{n}}$ (upper tail)
$p$-value
Reject if less than the level (half the level per tail for two-tailed).
Sample size
Solve $\dfrac{\bar{x} - \mu_0}{\sigma/\sqrt{n}} \geqslant z$ for $n$; round up.
Assumptions
Normal population, $\sigma$ known and unchanged, random sample.
Ten questions, from routine to exam-style. Work each one through before opening the solution.
$X \sim \mathrm{N}(40,\ 9)$. A random sample of size $16$ is taken. State the distribution of $\bar{X}$ and find $\mathrm{P}(\bar{X} < 39)$.
โถ Show solution
$\bar{X} \sim \mathrm{N}\!\left(40,\ \dfrac{9}{16}\right)$, standard deviation $\dfrac{3}{4} = 0.75$.
$\mathrm{P}(\bar{X} < 39) = \Phi\!\left(\dfrac{-1}{0.75}\right) = \Phi(-1.333) = 0.0912$
$X \sim \mathrm{N}(\mu,\ 6^2)$. Test $\mathrm{H}_0: \mu = 50$ against $\mathrm{H}_1: \mu > 50$ at the $5\%$ level, given that a sample of $36$ has mean $51.8$.
โถ Show solution
Under $\mathrm{H}_0$: $\bar{X} \sim \mathrm{N}(50,\ 1^2)$, since $6/\sqrt{36} = 1$.
$\mathrm{P}(\bar{X} \geqslant 51.8) = 1 - \Phi(1.8) = 0.0359 < 0.05$
Reject $\mathrm{H}_0$: sufficient evidence at the $5\%$ level that $\mu > 50$.
$X \sim \mathrm{N}(\mu,\ 10^2)$. For a test of $\mathrm{H}_0: \mu = 120$ against $\mathrm{H}_1: \mu < 120$ at the $1\%$ level using a sample of $25$, find the critical region for $\bar{X}$.
โถ Show solution
$\sigma/\sqrt{n} = 10/5 = 2$; critical $z = -2.3263$.
Boundary: $120 - 2.3263 \times 2 = 115.35$.
Critical region: $\bar{X} \leqslant 115.35$ (2 d.p.).
$X \sim \mathrm{N}(\mu,\ 5^2)$. A sample of $40$ gives $\bar{x} = 76.4$. Test $\mathrm{H}_0: \mu = 75$ against $\mathrm{H}_1: \mu \neq 75$ at the $5\%$ level.
โถ Show solution
$\sigma/\sqrt{n} = 5/\sqrt{40} = 0.7906$; $z = \dfrac{1.4}{0.7906} = 1.771$.
Two-tailed critical values $\pm 1.96$; $1.771 < 1.96$.
Do not reject $\mathrm{H}_0$: insufficient evidence at the $5\%$ level that $\mu \neq 75$.
The masses of bags of sugar are normally distributed with standard deviation $0.5$ kg; the stated mean is $8$ kg. A trading standards officer weighs $12$ bags and finds a mean of $7.74$ kg. Find the $p$-value for a test of whether the mean is less than $8$ kg, and state the conclusion at the $5\%$ level.
โถ Show solution
$\mathrm{H}_0: \mu = 8$, $\mathrm{H}_1: \mu < 8$. Under $\mathrm{H}_0$, $\bar{X} \sim \mathrm{N}\!\left(8,\ \dfrac{0.25}{12}\right)$, standard deviation $0.1443$.
$p = \mathrm{P}(\bar{X} \leqslant 7.74) = \Phi(-1.801) = 0.0358$
$0.0358 < 0.05$: reject $\mathrm{H}_0$. There is sufficient evidence that the mean mass is less than $8$ kg.
$X \sim \mathrm{N}(\mu,\ 12^2)$. Find the critical region for a two-tailed test of $\mathrm{H}_0: \mu = 200$ at the $10\%$ level using a sample of $9$.
โถ Show solution
$\sigma/\sqrt{n} = 12/3 = 4$; $5\%$ in each tail, $z = \pm 1.6449$.
$200 \pm 1.6449 \times 4 = 200 \pm 6.58$
Critical region: $\bar{X} \leqslant 193.42$ or $\bar{X} \geqslant 206.58$.
$X \sim \mathrm{N}(\mu,\ 8^2)$. Find the smallest sample size for which a sample mean of $62$ would lead to rejecting $\mathrm{H}_0: \mu = 60$ in favour of $\mathrm{H}_1: \mu > 60$ at the $5\%$ level.
โถ Show solution
Need $\dfrac{2}{8/\sqrt{n}} \geqslant 1.6449$, i.e. $\sqrt{n} \geqslant 4 \times 1.6449 = 6.580$.
$n \geqslant 43.29$, so $n = 44$.
A process produces rods whose lengths are normally distributed with standard deviation $2.1$ cm and target mean $30$ cm. Ten rods measure (cm):
$29.1,\ 31.4,\ 30.8,\ 32.2,\ 28.9,\ 31.7,\ 30.5,\ 32.6,\ 31.1,\ 30.9$
Test at the $5\%$ level whether the mean differs from $30$ cm.
โถ Show solution
$\bar{x} = \dfrac{309.2}{10} = 30.92$.
$\mathrm{H}_0: \mu = 30$, $\mathrm{H}_1: \mu \neq 30$. $\sigma/\sqrt{n} = 2.1/\sqrt{10} = 0.6641$.
$z = \dfrac{0.92}{0.6641} = 1.385$; $1.385 < 1.96$.
Do not reject $\mathrm{H}_0$: insufficient evidence at the $5\%$ level that the mean length differs from $30$ cm.
For a one-tailed test of $\mathrm{H}_0: \mu = 50$ against $\mathrm{H}_1: \mu > 50$ at the $5\%$ level, with a sample of $25$ from $\mathrm{N}(\mu,\ \sigma^2)$, the critical region is $\bar{X} \geqslant 52.47$. Find $\sigma$.
โถ Show solution
$52.47 = 50 + 1.6449 \times \dfrac{\sigma}{5}$
$\sigma = \dfrac{2.47 \times 5}{1.6449} = 7.51$ (3 s.f.)
The time taken to complete a puzzle is normally distributed with mean $18.0$ minutes and standard deviation $4.2$ minutes. After a training course, a random sample of $30$ people has mean time $16.7$ minutes.
(a) State hypotheses to test whether the training reduces the mean time. (b) Find the critical region at the $1\%$ level. (c) Carry out the test. (d) Find the $p$-value and state the conclusion at the $5\%$ level instead. (e) State an assumption you have made about the standard deviation, and explain why the test is still reasonable if the times are not exactly normal.
โถ Show solution
(a) $\mathrm{H}_0: \mu = 18$, $\mathrm{H}_1: \mu < 18$, where $\mu$ is the mean time after training.
(b) $\sigma/\sqrt{n} = 4.2/\sqrt{30} = 0.7668$. Boundary $18 - 2.3263 \times 0.7668 = 16.22$. Critical region $\bar{X} \leqslant 16.22$ (2 d.p.).
(c) $16.7 > 16.22$: not in the critical region. Do not reject $\mathrm{H}_0$; insufficient evidence at the $1\%$ level that training reduces the mean time.
(d) $z = \dfrac{16.7 - 18}{0.7668} = -1.695$; $p = \Phi(-1.695) = 0.0450$. Since $0.0450 < 0.05$, reject $\mathrm{H}_0$ at the $5\%$ level โ there is evidence that training reduces the mean time.
(e) The standard deviation is assumed to remain $4.2$ minutes after training. With a sample of $30$, the sample mean is approximately normally distributed even if individual times are not exactly normal, so the test is still reasonable.