Leave lesson

Statistics · Statistical sampling

1 / 11

Estimation and confidence intervals

The distribution of the sample mean and the Central Limit Theorem, unbiased estimates of a population mean and variance from sample data, and confidence intervals for a mean and for a proportion — building them, interpreting them, and choosing the sample size for a required width.

Statistics · Statistical sampling

Estimation and confidence intervals

The distribution of the sample mean and the Central Limit Theorem, unbiased estimates of a population mean and variance from sample data, and confidence intervals for a mean and for a proportion — building them, interpreting them, and choosing the sample size for a required width.

Why it works

The sample mean is itself random. Take a sample of nn values from a population with mean μ\mu and variance σ2\sigma^2 and average them: a different sample would give a different average. As a random variable, the sample mean Xˉ\bar{X} satisfies E(Xˉ)=μ,Var(Xˉ)=σ2n,\mathrm{E}(\bar{X}) = \mu, \qquad \mathrm{Var}(\bar{X}) = \frac{\sigma^2}{n}, by the linear-combination rules. Averaging doesn't move the centre, but it shrinks the spread — the standard deviation of Xˉ\bar{X} is σ/n\sigma/\sqrt{n}, so quadrupling the sample size halves it.

When is Xˉ\bar{X} Normal? If the population itself is Normal, Xˉ\bar{X} is exactly Normal for any nn. If the population is not Normal, the Central Limit Theorem rescues everything: for large nn (as a guide, n30n \geqslant 30), XˉN ⁣(μ,σ2n)\bar{X} \approx \mathrm{N}\!\left(\mu, \frac{\sigma^2}{n}\right) whatever the population's shape. Quote the CLT precisely when you rely on it — it is needed exactly when the population is not known to be Normal.

Estimating μ\mu and σ2\sigma^2 from a sample. The natural estimate of μ\mu is xˉ\bar{x}, and it is unbiased (right on average). But the raw sample variance (dividing by nn) is systematically too small — deviations are measured from xˉ\bar{x}, which was itself fitted to the data. Dividing by n1n - 1 corrects this: s2=1n1(x2nxˉ2)s^2 = \frac{1}{n-1}\left(\sum x^2 - n\bar{x}^2\right) is the unbiased estimate of the population variance. In exam data you usually receive x\sum x and x2\sum x^2; this formula is built for exactly that.

A confidence interval for μ\mu. Standardising Xˉ\bar{X} and unwinding the inequality gives the two-sided 95%95\% interval xˉ±1.96σn,\bar{x} \pm 1.96\,\frac{\sigma}{\sqrt{n}}, with 1.961.96 swapped for 1.6451.645 (90%90\%) or 2.5762.576 (99%99\%). Use σ\sigma if it is known; for a large sample replace it with ss. The interval's meaning is about the method, not one interval: if the sampling were repeated many times, 95%95\% of the intervals built this way would contain μ\mu. Saying "μ\mu has a 95%95\% chance of being in this interval" misreads it — μ\mu is a fixed number, not a random one.

Width and sample size. The full width is 2zσ/n2z\sigma/\sqrt{n}. "How large must the sample be for the width to be at most ww?" becomes 2zσ/nw2z\sigma/\sqrt{n} \leqslant w, solved for nn — and nn must be rounded up (rounding down would fail the requirement by a whisker).

A confidence interval for a proportion. With xx successes in nn trials, p^=x/n\hat{p} = x/n, and for large nn p^±zp^(1p^)n.\hat{p} \pm z\sqrt{\frac{\hat{p}(1 - \hat{p})}{n}}.