HomeLearning HubA Level MathsS2 4: Sampling and estimation
S2 4

Sampling and estimation

Probability & Statistics 2 · Paper 6

🎯What you need to be able to do

  • Explain what a random sample is and why sampling is used.
  • Use the distribution of the sample mean, \( \mathrm{N}\!\left(\mu, \frac{\sigma^{2}}{n}\right) \).
  • State and apply the Central Limit Theorem.
  • Calculate unbiased estimates of a population mean and variance.
  • Construct a confidence interval for a population mean.
  • Construct a confidence interval for a population proportion, and interpret it correctly.

📚The mathematics

Samples

A random sample is one in which every member of the population has an equal chance of being selected, and the selections are independent. Sampling is used because a census is usually too slow, too expensive, or destructive — you cannot test every fuse to destruction and still have fuses to sell.

Questions often ask why a proposed method is not a random sample. The answer names the group that is systematically over- or under-represented: asking people in a shopping centre on a weekday morning excludes everyone at work, so the sample is biased regardless of its size. A large biased sample is worse than a small random one, because it produces a confident wrong answer.

The distribution of the sample mean

From S2 2, for a sample of size \(n\) drawn from a population with mean \( \mu \) and variance \( \sigma^{2} \):

\( \mathrm{E}(\bar{X}) = \mu \)
\( \mathrm{Var}(\bar{X}) = \dfrac{\sigma^{2}}{n} \)

If the population is normal, \( \bar{X} \) is exactly normal. The quantity \( \dfrac{\sigma}{\sqrt{n}} \) is called the standard error of the mean.

The Central Limit Theorem

For a large sample — in practice \( n > 30 \) —

\[ \bar{X} \approx \mathrm{N}\!\left(\mu,\ \frac{\sigma^{2}}{n}\right) \]

whatever the distribution of the population. That last clause is the whole content of the theorem, and it is what the mark is for: the population may be skewed, discrete, or of unknown shape, and the sample mean is still approximately normal.

The theorem is about \( \bar{X} \), not about the population — a large sample from a skewed population does not make the data normal. If the population is already normal, no theorem is needed and no restriction on \(n\) applies.

Unbiased estimates

An estimator is unbiased if its expected value equals the parameter it estimates. For the mean, the sample mean does the job. For the variance, the divisor is \( n - 1 \):

\( \hat{\mu} = \bar{x} = \dfrac{\sum x}{n} \)
\( s^{2} = \dfrac{1}{n-1}\left(\sum x^{2} - \dfrac{\left(\sum x\right)^{2}}{n}\right) \)
Divide by \( n - 1 \), not \(n\). Dividing by \(n\) gives the variance of the sample, as in S1 1; dividing by \( n - 1 \) gives an unbiased estimate of the population variance. The two are different questions with different answers, and the wording — “unbiased estimate” — is the trigger. The reason for the correction is that deviations are measured from \( \bar{x} \) rather than from the unknown \( \mu \), which makes them slightly too small on average.

Confidence intervals for a mean

\[ \bar{x} \pm z\,\frac{\sigma}{\sqrt{n}} \]

with \( z = 1.96 \) for 95%, \( 1.645 \) for 90% and \( 2.576 \) for 99%. When \( \sigma \) is unknown, use \(s\) in its place — legitimate here because the sample is large.

Note what determines the width: the confidence level and \( \sqrt{n} \). Higher confidence means a wider interval, and halving the width needs four times the sample. There is no free lunch in either direction.

Confidence intervals for a proportion

With \( \hat{p} = \dfrac{\text{number of successes}}{n} \),

\[ \hat{p} \pm z\sqrt{\frac{\hat{p}(1 - \hat{p})}{n}} \]

This is the normal approximation to the binomial from S1 5, divided through by \(n\).

What a confidence interval means

This is examined as a written statement, and the wrong version is very common. A 95% confidence interval means:

If many samples were taken and an interval constructed from each, about 95% of those intervals would contain the true population mean.

It does not mean there is a 95% probability that \( \mu \) lies in this particular interval. \( \mu \) is a fixed number: it is either in this interval or it is not. The 95% describes the reliability of the method, not the status of one interval.

✏️Worked example

(a) A random sample of 50 components has \( \sum x = 1215 \) and \( \sum x^{2} = 30\,500 \), where \(x\) is the lifetime in hours. Calculate unbiased estimates of the population mean and variance. (b) Construct a 95% confidence interval for the population mean lifetime. (c) In a separate survey, 80 of 200 randomly chosen households own a particular appliance. Construct a 95% confidence interval for the population proportion. (d) State what “95% confidence” means in (b).

(a) The unbiased estimate of the mean is

\[ \bar{x} = \frac{1215}{50} = 24.3 \]

and, using the \( n - 1 \) divisor,

\[ s^{2} = \frac{1}{49}\left(30\,500 - \frac{1215^{2}}{50}\right) = \frac{30\,500 - 29\,524.5}{49} = \frac{975.5}{49} = 19.9 \]

so \( s = 4.462 \).

(b) The standard error is \( \dfrac{s}{\sqrt{n}} = \dfrac{4.462}{\sqrt{50}} = 0.6310 \). With \( n = 50 > 30 \) the Central Limit Theorem applies, so

\[ 24.3 \pm 1.96(0.6310) = 24.3 \pm 1.237 \]

giving \( (23.1,\ 25.5) \) hours.

(c) Here \( \hat{p} = \dfrac{80}{200} = 0.4 \), so

\[ 0.4 \pm 1.96\sqrt{\frac{0.4 \times 0.6}{200}} = 0.4 \pm 1.96(0.03464) = 0.4 \pm 0.0679 \]

giving \( (0.332,\ 0.468) \).

(d) If the sampling procedure were repeated many times and an interval constructed from each sample, about 95% of those intervals would contain the true mean lifetime. It is a statement about the long-run reliability of the method, not about this one interval.

Check it. Both intervals are symmetric about their estimate — if yours is not, an arithmetic slip has crept in. In (b), the half-width 1.237 is about 5% of the mean, which is reasonable for \( n = 50 \); a half-width larger than the mean itself would signal that \( \sqrt{n} \) was omitted. In (c), the interval lies comfortably inside \( [0, 1] \), as any interval for a proportion must — one that spills outside is a sign that \(n\) is too small for the normal approximation.
Divide by \( \sqrt{n} \), not \(n\). Using \( \dfrac{s}{n} = 0.0892 \) in (b) would give the far-too-narrow interval \( (24.1,\ 24.5) \). The standard error measures the spread of the mean, whose variance is \( \dfrac{\sigma^{2}}{n} \) — so the standard deviation carries a square root. Write the standard error on its own line before building the interval.

📝Practise

Work through these, then reveal the answer.

1. A sample of 8 values is 12, 15, 11, 14, 18, 13, 16, 17. Find unbiased estimates of the population mean and variance.
\( \sum x = 116 \) and \( \sum x^{2} = 1724 \). The mean estimate is \( \bar{x} = \frac{116}{8} = 14.5 \). The variance estimate is \( s^{2} = \frac{1}{7}\left(1724 - \frac{116^{2}}{8}\right) = \frac{1724 - 1682}{7} = \frac{42}{7} = 6 \). Dividing by 8 instead would have given 5.25 — the sample variance, which is not what was asked.
2. State the Central Limit Theorem, and explain why it is needed when the population distribution is unknown.
For a sufficiently large sample (\( n > 30 \)) from a population of mean \( \mu \) and variance \( \sigma^{2} \), the sample mean is approximately \( \mathrm{N}\!\left(\mu, \frac{\sigma^{2}}{n}\right) \), whatever the population distribution. It is needed because confidence intervals and hypothesis tests about \( \mu \) rely on knowing the distribution of \( \bar{X} \); without the theorem, an unknown population shape would leave that distribution unknown too.
3. A random sample of 36 measurements has mean 500 from a population with known standard deviation 12. Construct a 90% confidence interval for the population mean.
For 90% confidence, \( z = 1.645 \). The standard error is \( \frac{12}{\sqrt{36}} = 2 \), so the interval is \( 500 \pm 1.645(2) = 500 \pm 3.29 \), that is \( (496.7,\ 503.3) \). A 95% interval would have been wider, at \( 500 \pm 3.92 \) — more confidence costs precision.
4. With \( \sigma = 12 \), what sample size is needed for a 95% confidence interval of total width 2?
A total width of 2 means a half-width of 1, so \( 1.96\dfrac{12}{\sqrt{n}} = 1 \). Then \( \sqrt{n} = 23.52 \) and \( n = 553.2 \). Since \(n\) must be a whole number and a larger sample can only help, round up: \( n = 554 \). Rounding down would leave the interval slightly too wide.
5. A student says: "The 95% confidence interval is (23.1, 25.5), so there is a 95% probability that \( \mu \) lies between 23.1 and 25.5." Explain why this is wrong.
\( \mu \) is a fixed constant, not a random variable — it either lies in this interval or it does not, so no probability attaches to it. What varies from sample to sample is the interval. The correct statement is that about 95% of intervals constructed this way, from repeated samples, would contain \( \mu \).
6. In a survey, 45 of 300 people said they cycle to work. Construct a 90% confidence interval for the population proportion.
\( \hat{p} = \frac{45}{300} = 0.15 \). The standard error is \( \sqrt{\frac{0.15 \times 0.85}{300}} = \sqrt{0.000425} = 0.02062 \). With \( z = 1.645 \), the interval is \( 0.15 \pm 1.645(0.02062) = 0.15 \pm 0.0339 \), that is \( (0.116,\ 0.184) \).

🔗Go deeper — other people’s work

These are external resources, not mine. If one stops working, tell me and everything above it on this page still stands.

  • Seeing Theory (Brown University) — the Central Limit Theorem and confidence intervals, both animated
  • Khan Academy — sampling distributions and confidence intervals
  • Rossman/Chance applets — simulate many intervals and watch roughly 95% of them capture \( \mu \)