4.16 Confidence intervals

4.16 Confidence intervals

IB Maths: Applications and Interpretation HL: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • A confidence interval is xˉ±\bar x\pm margin of error; the confidence level describes the method, not one interval.
  • σ\sigma known: xˉ±zσn\bar x\pm z\frac{\sigma}{\sqrt n}. σ\sigma unknown: xˉ±tn−1sn−1n\bar x\pm t_{n-1}\frac{s_{n-1}}{\sqrt n}.
  • The zz values: 1.6451.645 (90%90\%), 1.961.96 (95%95\%) and 2.5762.576 (99%99\%).
  • The interval is narrower for a larger sample, less spread or a lower confidence level.
  • For a sample size, use n≥(zσE)2n\ge\left(\frac{z\sigma}{E}\right)^2 and round up.

Point estimates and intervals

A confidence interval gives a range of plausible values for μ\mu; the level says how often the method works.

A point estimate is one value estimating a population parameter: xˉ\bar x estimates μ\mu. An unbiased estimate of the variance is sn−12=∑(x−xˉ)2n−1s_{n-1}^2=\frac{\sum(x-\bar x)^2}{n-1}; the GDC gives sn−1s_{n-1} (not σn\sigma_n, which divides by nn).

A confidence interval is xˉ±\bar x\pm margin of error. The confidence level (for example 95%95\%) says that about 95%95\% of intervals built from many random samples would contain the true mean. Any one interval either contains μ\mu or it does not.

404244464850525456586046x̄ = 5054
A confidence interval is x̄ ± margin of error: here 50 ± 4, from 46 to 54
  • Confidence intervalxˉ±margin of error\bar x\pm\text{margin of error}
  • 95% confidenceabout 95%95\% of such intervals contain μ\mu

A 95%95\% confidence interval for μ\mu is (3.96, 4.44)(3.96,\ 4.44). Which statement is correct?

Interval when σ is known

Use xˉ±zσn\bar x\pm z\frac{\sigma}{\sqrt n}, with zz chosen for the confidence level.

If the population is normal with known σ\sigma (or nn is large, by the central limit theorem), then Xˉ∼N(μ,σ2n)\bar X\sim N\left(\mu,\frac{\sigma^2}{n}\right) and the interval is xˉ±zσn\bar x\pm z\frac{\sigma}{\sqrt n}.

The critical value zz leaves half the remaining probability in each tail: 1.6451.645 for 90%90\%, 1.961.96 for 95%95\% and 2.5762.576 for 99%99\%. On the GDC, z=invNorm(0.975)z=\text{invNorm}(0.975) for 95%95\%, or use the ZZ-interval option.

The margin of error is zσnz\frac{\sigma}{\sqrt n}.

−4−3−2−112340.10.20.30.4xy-1.961.96Standard normal
The middle 95%95\% of the standard normal distribution lies between z=−1.96z=-1.96 and z=1.96z=1.96.

Worked example

n=25n=25, xˉ=4.20\bar x=4.20, σ=0.6\sigma=0.6. Find a 95%95\% confidence interval for μ\mu.

Which critical value zz is used for a 99%99\% confidence interval?

Interval when σ is unknown

Replace σ\sigma with sn−1s_{n-1} and use the tt-distribution with n−1n-1 degrees of freedom.

When σ\sigma is unknown, use the tt-distribution with ν=n−1\nu=n-1 degrees of freedom, whatever the sample size (the population is assumed normal):

xˉ±tνsn−1n.\bar x\pm t_{\nu}\frac{s_{n-1}}{\sqrt n}.

The tt-distribution is symmetric like the normal but has heavier tails, so tν>zt_\nu>z, especially for small nn.

On the GDC use the TT-interval option with the data list or summary statistics.

−4−3−2−112340.10.20.30.4xyt, 3 degrees of freedomStandard normal
The tt-distribution with 33 degrees of freedom (solid) has heavier tails than the standard normal (dashed).

Worked example

n=12n=12, xˉ=40.375\bar x=40.375, sn−1=1.11s_{n-1}=1.11. Find a 95%95\% confidence interval for μ\mu.

A sample of n=20n=20 has sn−1s_{n-1} given but σ\sigma is unknown. How many degrees of freedom are used?

What affects the width

More data, less spread or less confidence all narrow the interval; more confidence widens it.

The width is 2×2\times margin of error. A higher confidence level gives a wider interval: more certainty costs precision.

To get a margin of error at most EE with known σ\sigma, solve zσn≤Ez\frac{\sigma}{\sqrt n}\le E:

n≥(zσE)2,n\ge\left(\frac{z\sigma}{E}\right)^2,

and round up to a whole sample size.

024681090%95%99%confidence levelinterval width
Width of the interval for σ/√n = 2: a higher confidence level gives a wider interval

Narrower interval

  • Larger sample
  • Less spread in the population
  • Lower confidence level

Wider interval

  • Smaller sample
  • More spread in the population
  • Higher confidence level

Worked example

Find the smallest sample size for a 99%99\% interval with margin of error at most 0.20.2, given σ=1.1\sigma=1.1.

Which change makes a confidence interval narrower?

Interpreting in context

Say you are confident the mean lies in the interval, in context, and state the assumptions.

Typical statement: "We are 95%95\% confident that the mean mass of cats of this breed lies between 3.963.96 kg and 4.444.44 kg."

If a claimed value lies outside the interval, there is evidence that the true mean differs from the claim at that confidence level. If it lies inside, the data are consistent with the claim (this does not prove it).

State the assumptions: a random sample, and a normal population (or a large sample).

3.83.944.14.24.34.44.54.63.964.204.44

A 95%95\% interval for the mean mass is (3.96, 4.44)(3.96,\ 4.44) kg. A breeder claims μ=4.5\mu=4.5 kg. What is the conclusion?

Try an exam question

A random sample of n=40n=40 has mean xˉ=12.4\bar x=12.4. The population is normal with known standard deviation σ=2.5\sigma=2.5. Find a 95%95\% confidence interval for the population mean.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Which of the following should be used to construct a 95%95\% confidence interval for μ\mu?

1 mark, marked against the mark scheme

Revision notes