Sampling, estimation and hypothesis testing

A-Level Mathematics · Probability & Statistics — Further

Sampling and the Central Limit Theorem

For a random sample of size $n$ from a population with mean $\mu$ and variance $\sigma^{2}$:

$$\text{E}\left(\bar X\right)=\mu,\qquad \text{Var}\left(\bar X\right)=\frac{\sigma^{2}}{n}$$

The Central Limit Theorem says that for large $n$, $\bar X$ is approximately normal whatever the population distribution. This is what makes inference possible without knowing the population shape.

Unbiased estimates

$$\hat\mu=\bar x=\frac{\sum x}{n},\qquad s^{2}=\frac{1}{n-1}\left(\sum x^{2}-\frac{\left(\sum x\right)^{2}}{n}\right)$$

The divisor is $n-1$, not $n$: dividing by $n$ systematically underestimates the spread.

Confidence intervals

$$\bar x\pm z\frac{\sigma}{\sqrt{n}}\qquad(z=1.96\ \text{for}\ 95\%,\ 2.576\ \text{for}\ 99\%)$$

Hypothesis tests

value under H₀ critical value 5% rejection region If H₀ is TRUE but the sample falls in the red zone ⇒ Type I error P(Type I) = area of red zone The significance level is something we CHOOSE, and it is exactly the Type I risk we accept
A Type I error is not an accident, but a price chosen in advance. This curve shows the distribution of the test statistic when $H_{0}$ is true. The red zone is the rejection region; if $H_{0}$ is really true but the sample happens to fall there, we reject wrongly — and this happens with probability exactly equal to the area of the red zone. So choosing a $5\%$ significance level is announcing in advance: “I accept being wrong in this way once in twenty times”. With a discrete variable (binomial, Poisson), the rejection region contains only integer values, so the area cannot match $5\%$ exactly; the probability of a Type I error is then smaller than the significance level, and exam questions very often ask for that actual figure.

Worked example: confidence interval and how to read it

A random sample of $100$ components has a mean lifetime of $25.0$ hours. The population standard deviation is known to be $\sigma=5$ hours. Construct a $95\%$ confidence interval for the population mean $\mu$, and explain what it means.

Solution

Step 1 — standard error.

$$\frac{\sigma}{\sqrt{n}}=\frac{5}{\sqrt{100}}=0.5$$

Step 2 — the interval.

$$25.0\pm 1.96(0.5)=25.0\pm 0.98$$$$(24.02,\ 25.98)$$

Step 3 — interpret it correctly. The standard interpretation is: if this sampling procedure were repeated very many times, $95\%$ of the intervals obtained would contain $\mu$.

A very common incorrect statement: “there is a $95\%$ probability that $\mu$ lies in the interval $(24.02,\ 25.98)$”. It is wrong because $\mu$ is a fixed constant, not random — it either lies in that interval or it does not. What is random here is the interval, because it changes from sample to sample. Cambridge awards a separate mark for this interpretation, and it is the easiest mark to lose in the whole question.

Two practical remarks. Raising the level to $99\%$ increases $z$ to $2.576$, so the interval becomes wider — to be more certain you must be vaguer. Increasing $n$ to $400$ cuts the standard error in half, so the interval becomes half as wide; to halve the width you must pay four times the sample size.

Worked example: a test on a discrete variable and Type I error

The number of flaws per roll of fabric has always followed $\text{Po}(4)$. After a change in the process, one roll is inspected and found to have $1$ flaw. Test at the $5\%$ level whether the mean number of flaws has decreased, then find the rejection region and the probability of a Type I error.

Solution

Step 1 — hypotheses, written in terms of the population parameter.

$$H_{0}:\ \lambda=4\qquad H_{1}:\ \lambda<4$$

Step 2 — calculate $p$. This is a one-tailed test on the left, so $p$ is the probability of observing a result equal to or more extreme than the value seen:

$$p=P(X\le 1\mid \lambda=4)=e^{-4}(1+4)=5(0.018316)=0.0916$$

Step 3 — compare and conclude. $0.0916>0.05$, so do not reject $H_{0}$. There is not enough evidence at the $5\%$ level to conclude that the mean number of flaws per roll has decreased.

Step 4 — rejection region. Because $X$ takes integer values, you must check each value in turn:

$$P(X\le 0)=e^{-4}=0.0183<0.05\qquad P(X\le 1)=0.0916>0.05$$

So the rejection region consists only of $X=0$.

Step 5 — Type I error. This is the probability of falling in the rejection region when $H_{0}$ is true:

$$P(\text{Type I})=P(X=0\mid\lambda=4)=0.0183$$

Notice that this figure is smaller than the $5\%$ significance level, and that is not a mistake: with a discrete variable the rejection region jumps in integer steps, so it rarely matches exactly $5\%$. Getting a figure larger than $0.05$ is the sign that the wrong rejection region was chosen.

Common mistake

Concluding with the word “prove” or “$H_{0}$ is true”. A hypothesis test never proves anything — it only says whether the evidence is strong enough to reject $H_{0}$. Here are three ways of writing that lose marks and three that earn marks. Wrong: “shows that the mean has decreased”; “$H_{0}$ is true”; “accept $H_{0}$”. Right: “there is evidence at the $5\%$ level that the mean has decreased”; “do not reject $H_{0}$”; “there is not enough evidence to conclude that the mean has decreased”. The reason is not pedantry about wording: failing to reject $H_{0}$ may simply be because the sample is too small to detect a real change, not because $H_{0}$ is true. And the conclusion must mention the context of the question — “the number of flaws per roll of fabric”, not “$\lambda$”.

Key takeaway

Statistical inference is making a statement together with a level of certainty, so the calculation accounts for only half of the marks. The other half lies in writing hypotheses in terms of the population parameter, interpreting the confidence interval correctly, and giving a conclusion tied to the context without overclaiming.

← Continuous random variables · All A-Level Mathematics lessons · Practice A-Level Mathematics questions (free, instant scoring)