4.16 · AHL · HL onlyPaper 1Paper 3

Confidence intervals for the mean

In a minute

A is a range of plausible values for a mean, worked out from one . If σ\sigma is known you use the ; if not, the . Then you say what the interval means in context.

You'll be able to

  • Find a confidence interval for the mean of a normal population when σ\sigma is known, using the normal distribution.
  • Find a confidence interval when σ\sigma is unknown, using the t-distribution with n−1n - 1 , whatever the sample size.
  • Interpret a confidence interval in context and use it to judge a claimed mean.
  • Explain how the confidence level and the sample size change an interval's width.
Before you start3 quick questions on what this builds on
Check yourself
Z∼N(0,1)Z \sim \mathrm{N}(0, 1). Find zz such that P(Z<z)=0.8\mathrm{P}(Z < z) = 0.8.
Check yourself
X∼N(μ,152)X \sim \mathrm{N}(\mu, 15^{2}). Find the standard deviation of Xˉ\bar{X}, the mean of a random sample of 99 values of XX.
Check yourself
A sample of 1010 values has sn=4.2s_{n} = 4.2. Find sn−12s_{n-1}^{2}, the of the population variance.

Revise first: 4.1 Sampling, data quality and outliers, 4.3 Central tendency and dispersion, 4.9 Normal distribution, 4.11 Chi-squared tests and the t-test, 4.14 Linear combinations and unbiased estimates and 4.15 Sample mean and the central limit theorem

Intervals when σ is known

A sample mean xˉ\bar{x} estimates the population mean μ\mu, but another sample would give a different xˉ\bar{x}. So you give a range of plausible values for μ\mu instead, with a level of confidence.

In 4.15 you met the . For a normal population with standard deviation σ\sigma, Xˉ∼N(μ,σ2n)\bar{X} \sim \mathrm{N}\left(\mu, \frac{\sigma^{2}}{n}\right). So 95%95\% of sample means lie within 1.96σn1.96\frac{\sigma}{\sqrt{n}} of μ\mu.

A bell-shaped curve for the sample mean, centred on mu. The middle region between mu minus 1.96 standard errors and mu plus 1.96 standard errors is shaded and labelled 95 percent. Each small tail outside it is labelled 2.5 percent. The standard error is sigma over root n. 95% 2.5% 2.5% μ μ − 1.96 σ/√n μ + 1.96 σ/√n values of the sample mean x̄
95%95\% of sample means land within 1.96σn1.96\frac{\sigma}{\sqrt{n}} of μ\mu.

Turn that round: if xˉ\bar{x} is within 1.96σn1.96\frac{\sigma}{\sqrt{n}} of μ\mu, then μ\mu is within 1.96σn1.96\frac{\sigma}{\sqrt{n}} of xˉ\bar{x}. So xˉ±1.96σn\bar{x} \pm 1.96\frac{\sigma}{\sqrt{n}} contains μ\mu for 95%95\% of samples.

Learn this
xˉ±z∗σn(normal population, σ known)\bar{x} \pm z^{*}\frac{\sigma}{\sqrt{n}} \qquad (\text{normal population, } \sigma \text{ known})

The multiplier z∗z^{*} cuts off the middle c%c\% of N(0,1)\mathrm{N}(0, 1). For 95%95\%, P(Z<z∗)=0.975\mathrm{P}(Z < z^{*}) = 0.975, so z∗=1.960z^{*} = 1.960. For 90%90\% it is 1.6451.645, and for 99%99\% it is 2.5762.576.

The part after ±\pm is the margin of error, and the interval is centred on xˉ\bar{x}. The GDC's Z interval does the whole calculation.

Worked exampleA fisheries officer knows that the lengths of adult trout in a lake are normally distributed with standard deviation 3.23.2 cm. She measures 2020 randomly caught adult trout and finds a mean length of 41.641.6 cm. Find a 95%95\% confidence interval for the mean length of all adult trout in the lake.

Try it first, then reveal one step at a time.

  1. σ=3.2\sigma = 3.2 is known, so use the normal distribution: z∗=1.95996…z^{*} = 1.95996\ldots
Worked exampleLong testing shows that a phone model's battery life on a standard video test is normally distributed with standard deviation 2.42.4 hours. A random sample of 1515 phones from a new batch has a mean battery life of 18.718.7 hours. Use your calculator to find a 99%99\% confidence interval for the mean battery life of the batch, to 3 s.f., and interpret it.

Try it first, then reveal one step at a time.

  1. σ\sigma is known, so this is a Z interval. Write down what you enter: σ=2.4\sigma = 2.4, xˉ=18.7\bar{x} = 18.7, n=15n = 15, C-Level 0.990.99.
Check yourself
Which multiplier z∗z^{*} gives a 90%90\% confidence interval when σ\sigma is known?
Check yourself
A lab balance's readings are normally distributed with known standard deviation 0.150.15 g. Twelve weighings of one sample have mean 8.428.42 g. Find the upper end of a 95%95\% confidence interval for the mean reading, to 3 s.f.

Intervals when σ is unknown

Usually you don't know σ\sigma. You estimate it from the sample with sn−1s_{n-1}. Its square sn−12s_{n-1}^{2} is the of σ2\sigma^{2} from 4.14; sn−1s_{n-1} itself is the usual estimate of σ\sigma, though not exactly unbiased.

The estimate adds uncertainty, so the multiplier must be bigger than z∗z^{*}. The t-distribution gives it: the same distribution as the in 4.11.

As nn grows, it gets closer to N(0,1)\mathrm{N}(0, 1). For 95%95\%, t∗=2.306t^{*} = 2.306 when ν=8\nu = 8 and 2.0232.023 when ν=39\nu = 39, against z∗=1.960z^{*} = 1.960.

Learn this
xˉ±t∗sn−1n(normal population, σ unknown, ν=n−1)\bar{x} \pm t^{*}\frac{s_{n-1}}{\sqrt{n}} \qquad (\text{normal population, } \sigma \text{ unknown, } \nu = n - 1)

t∗t^{*} cuts off the middle c%c\% of that t-distribution. The GDC's T interval does it all, from a list of data or from xˉ\bar{x}, sn−1s_{n-1} and nn.

Worked exampleA café measures the caffeine content, in mg, of 99 randomly chosen cups of its filter coffee: 92,105,88,110,97,101,94,108,9992, 105, 88, 110, 97, 101, 94, 108, 99. Caffeine content is normally distributed. Use your calculator to find a 95%95\% confidence interval for the mean caffeine content of a cup, to 3 s.f.

Try it first, then reveal one step at a time.

  1. σ\sigma is unknown, so use a T interval with 9−1=89 - 1 = 8 degrees of freedom.
Worked exampleA botanist measures 4040 randomly chosen seedlings of a new variety after three weeks. Their mean height is 12.612.6 cm and sn=2.3s_{n} = 2.3 cm, and heights follow a normal distribution. Give a 90%90\% confidence interval for the mean height of all seedlings of this variety, to 3 s.f.

Try it first, then reveal one step at a time.

  1. σ\sigma is unknown, so use t, even though n=40n = 40 is large: ν=39\nu = 39.
Check yourself
A council weighs 6060 random household bins; the weights are normally distributed with unknown σ\sigma. Which distribution gives the multiplier for a confidence interval for the mean weight?
Check yourself
A random sample of drivers has reaction times, in ms, of 312,287,335,298,321312, 287, 335, 298, 321. Reaction times are normally distributed. Find the lower end of a 95%95\% confidence interval for the mean reaction time, to 3 s.f.

Interpreting a confidence interval

The 95%95\% describes the method, not one interval. μ\mu is fixed, so a particular interval either contains it or doesn't. Build intervals from many random samples, and about 95%95\% of them contain μ\mu.

Twenty horizontal line segments stacked one above another, each a 95 percent confidence interval from a different random sample, with a dot at its sample mean. A dashed vertical line marks the true population mean mu. Nineteen segments cross the dashed line. One segment, drawn in a different colour, lies entirely to the right of it and misses mu. true μ 19 of these 20 intervals contain μ; one misses
Each sample gives a different interval. In the long run about 95%95\% of them contain μ\mu.

So write: 'We are 95%95\% confident that the mean [quantity] of all [population] is between aa and bb [units].' Never say there is a 95%95\% probability that μ\mu is in your interval.

To judge a claimed value of μ\mu, see where it falls. Inside the interval, it is plausible: no evidence against the claim. Outside, the data give evidence against the claim. An interval never proves a claim.

A higher confidence level uses a bigger multiplier, so a wider interval. For the same standard deviation, a larger sample gives a narrower one: four times the sample size roughly halves the width.

Both intervals assume a normally distributed population and a random sample, so the values are independent. Exam questions often ask you to state one of these.

Worked exampleThe café's 95%95\% confidence interval for the mean caffeine content of a cup is [93.6,105][93.6, 105] mg. (a) Interpret the interval. (b) The menu says a cup contains 100100 mg on average. Comment on this claim. (c) A health website says the café's cups average 110110 mg. Comment on this claim.

Try it first, then reveal one step at a time.

  1. (a) Name the population, the mean and the units.
Worked exampleA dietitian records the daily sugar intake of 3030 randomly chosen adults: xˉ=52.4\bar{x} = 52.4 g and sn−1=14.0s_{n-1} = 14.0 g. Intake is normally distributed, and the 95%95\% confidence interval for the mean is [47.2,57.6][47.2, 57.6] g. (a) Find the 99%99\% confidence interval, to 3 s.f. (b) Explain why it is wider. (c) Describe how the 95%95\% interval would change with 120120 adults and the same xˉ\bar{x} and sn−1s_{n-1}.

Try it first, then reveal one step at a time.

  1. (a) σ\sigma is unknown, so use t with 2929 degrees of freedom: t∗=2.7563…t^{*} = 2.7563\ldots Margin: 2.7563…×14.030=7.0453…2.7563\ldots \times \frac{14.0}{\sqrt{30}} = 7.0453\ldots
Check yourself
A 95%95\% confidence interval for the mean commute time of a city's workers is [31.2,36.8][31.2, 36.8] minutes. Which statement is correct?
Check yourself
A 95%95\% confidence interval for the mean volume of a brand's juice cartons is [496.1,499.3][496.1, 499.3] ml. The label says 500500 ml. What is the best comment?

Common mistakes

  • Using the normal distribution because the sample is large. If σ\sigma is estimated from the sample, use the t-distribution with n−1n - 1 degrees of freedom, whatever nn is.
  • Saying there is a 95%95\% probability that μ\mu is in your interval. The 95%95\% belongs to the method: about 95%95\% of intervals built this way contain μ\mu.
  • Commenting on a claim with no reason. Say whether the value is inside or outside the interval, then what that means for the claim.
  • Writing the interval in terms of xˉ\bar{x}, such as 93.6<xˉ<10593.6 < \bar{x} < 105. The interval estimates the population mean μ\mu.
  • Rounding early or to the wrong accuracy. Each end usually earns its own mark: keep full GDC values and round only the ends, as asked.

Exam tips

  • **Find** a confidence interval: name the interval (T if σ\sigma is unknown, Z if known) and the values entered, then both ends to the accuracy asked.
  • **Comment** on a claim: say the value is inside or outside the interval, then conclude about the claim in context. A conclusion with no reason scores nothing.
  • **State** an assumption: the variable is normally distributed in the population, or the sample is random (independent values).
  • **Interpret** an interval: 'We are 95%95\% confident that the mean [quantity] of all [population] is between aa and bb [units].'

Key takeaways

Learn thisxˉ±z∗σn(normal population, σ known)\bar{x} \pm z^{*}\frac{\sigma}{\sqrt{n}} \qquad (\text{normal population, } \sigma \text{ known})
Learn thisxˉ±t∗sn−1n(normal population, σ unknown, ν=n−1)\bar{x} \pm t^{*}\frac{s_{n-1}}{\sqrt{n}} \qquad (\text{normal population, } \sigma \text{ unknown, } \nu = n - 1)
Learn thisFor the mean of a normal population: σ\sigma known, use the normal distribution; σ\sigma unknown, use the t-distribution with n−1n - 1 degrees of freedom and sn−1s_{n-1}, whatever the sample size.
Learn thisNormal multipliers (σ\sigma known): z∗=1.645z^{*} = 1.645 for 90%90\%, 1.9601.960 for 95%95\%, 2.5762.576 for 99%99\%.
Learn thisA 95%95\% confidence interval comes from a method that captures μ\mu for about 95%95\% of random samples. One interval either contains μ\mu or not.
Learn thisA claimed mean inside the interval is plausible (no evidence against it); one outside the interval is evidence against the claim.
Learn thisFrom the same sample, a higher confidence level gives a wider interval. At the same confidence level and standard deviation, a larger sample gives a narrower one.

Practise this

4 past-paper questions on Confidence intervals for the mean in the AI HL bank, each with a mark scheme and a worked explanation.

Practise Confidence intervals for the mean →