Confidence Intervals (AI HL)

A sample mean is only an estimate of the true population mean - a confidence interval turns that single estimate into a range that's likely to contain the real value. This topic covers building a confidence interval using the t-distribution (when the population standard deviation is unknown, which is almost always) or the normal distribution (when it's known), interpreting what the resulting interval and its confidence level actually mean, and using an interval to comment on a claimed value.

What the syllabus says

This topic maps onto one point in the official IB Applications & Interpretation syllabus, examinable only at HL.

CodeSyllabus content
AHL4.16Confidence intervals for the mean of a normal population. Use of the normal distribution when \(\sigma\) is known, and the \(t\)-distribution when \(\sigma\) is unknown - regardless of sample size. Students should be able to interpret the meaning of their results in context.

This is Additional Higher Level (AHL) content - examinable at AI HL only, not at AI SL.

Key terms

Five words worth knowing cold before you touch the formulas below - each with a worked example showing exactly what it means.

What is a confidence interval?

A confidence interval is a range of values, built from sample data, that is likely to contain the true population parameter (here, the population mean). It's written as (lower bound, upper bound), or equivalently as a point estimate plus or minus a margin of error.

e.g. A sample of 60 batteries with \(\bar{x}=250\) mAh and \(s=18\) mAh gives a 95% confidence interval of \((245,\ 255)\) mAh.

What is a point estimate?

A point estimate is a single best-guess value for the population parameter, calculated directly from the sample - for the mean, this is simply the sample mean \(\bar{x}\). It's also the midpoint of the confidence interval built around it.

e.g. For the interval \((116,\ 124)\), the point estimate is \(\bar{x} = \dfrac{116+124}{2} = 120\).

What is the margin of error?

The margin of error \(E\) is the distance from the point estimate out to either end of the confidence interval - half of the interval's total width. A smaller margin of error means a more precise estimate.

e.g. For \((116,\ 124)\), \(E = \dfrac{124-116}{2} = 4\), so the interval is \(120 \pm 4\).

When do you use the t-distribution instead of the normal distribution?

Use the \(t\)-distribution whenever the population standard deviation \(\sigma\) is unknown and you're working from a sample standard deviation \(s\) instead - which IB requires regardless of how large the sample is. Use the normal distribution only when \(\sigma\) is actually given.

e.g. Given only a sample of 6 components with \(s \approx 1.41\), use a \(t\)-interval with \(\text{df}=5\), not a \(z\)-interval.

What does "95% confidence" actually mean?

It's a statement about the long-run procedure, not about one specific interval: if the sampling were repeated many times and an interval computed from each sample, about 95% of those intervals would contain the true population mean.

e.g. For a mean mass with 95% CI \((245,\ 255)\)g, 95% of intervals built this way from repeated samples would contain the true mean mass.

Key formulas

Two formulas cover this whole topic, depending on whether the population standard deviation is known - the tables below line them up and show what changes the width of an interval.

Formula reference

Both interval formulas are on the official formula booklet - you never derive them from scratch.

FormulaUsed forBooklet?
\(\bar{x} \pm z\dfrac{\sigma}{\sqrt{n}}\)CI for the mean, \(\sigma\) known✓ Yes
\(\bar{x} \pm t\dfrac{s}{\sqrt{n}}\), \(\text{df}=n-1\)CI for the mean, \(\sigma\) unknown✓ Yes
\(E = \tfrac12(\text{upper} - \text{lower})\)Recovering the margin of error from an intervalNot in the formula booklet - prior knowledge

z-interval vs t-interval

Both give a confidence interval for the same mean - the choice depends entirely on whether \(\sigma\) is known.

Featurez-intervalt-interval
Used when\(\sigma\) is known\(\sigma\) is unknown (uses \(s\))
Formula\(\bar{x} \pm z\dfrac{\sigma}{\sqrt{n}}\)\(\bar{x} \pm t\dfrac{s}{\sqrt{n}}\)
Depends on sample size beyond \(n\) itself?NoYes - critical value depends on \(\text{df}=n-1\)
How common in examsRare - \(\sigma\) is seldom givenThe default case

What affects the width of a CI

Three quantities control how wide a confidence interval turns out to be, and each behaves differently.

Confidence level

90% → 95% → 99%

A higher confidence level needs a larger critical value, which widens the interval.

Sample size n

\(\dfrac{s}{\sqrt{n}}\) shrinks as \(n\) grows

A larger sample narrows the interval, since the standard error \(s/\sqrt{n}\) decreases.

Standard deviation s

More spread → wider interval

A more variable population produces a less precise estimate of the mean, widening the interval.

Reading and using a CI

Most exam questions ask you to extract information from an interval, or use it to judge a claim.

Point estimate = midpoint

\(\bar{x} = \dfrac{\text{lower}+\text{upper}}{2}\)

The sample mean sits exactly in the middle of a symmetric confidence interval.

Margin of error = half-width

\(E = \dfrac{\text{upper}-\text{lower}}{2}\)

Written as \(\bar{x} \pm E\), this is the distance from the centre to either end.

Testing a claimed value

Inside vs outside the interval

If a claimed value lies outside the interval, that's evidence against the claim at that confidence level; if it lies inside, the data are consistent with it.

The 95% confidence interpretation

This is one of the most frequently misworded ideas in the whole syllabus - precise wording earns the mark.

About the procedure

Not about one interval

"95% confidence" describes what happens across many repeated samples, not the probability attached to this one fixed interval.

Requires repeated sampling

The condition behind it

The interpretation only holds if sampling is repeated randomly, under the same conditions, from the same population.

Common misstatement

Avoid "95% probability"

Saying "there's a 95% probability the true mean is in this interval" is a common but imprecise way to phrase the idea - stick to the repeated-sampling wording.

Worked examples

Two full exam-style questions, marked exactly like the real thing. Try each one yourself before checking the worked solution.

1
Medium
Calculator
[3 marks]

The lengths (cm) of 6 components are \(21,\ 23,\ 20,\ 24,\ 22,\ 22.\) Find a 95% confidence interval for the mean length:

Value212320242222

(a)(i) State the lower bound.

(a)(ii) State the upper bound.

(b) Find the margin of error.

Worked solution

(a)(i) Enter the data; use the \(t\)-interval routine (Data), df \(=5.\) \(\bar x=22,\ s=1.41;\)
Lower bound \(20.5\) cm (3 s.f.). A1

(a)(ii) Upper bound \(23.5\) cm (3 s.f.). A1

(b) \(E=1.5\) cm. A1

A1 Correct lower bound, 20.5 cm A1 Correct upper bound, 23.5 cm A1 Correct margin of error, 1.5 cm
2
Hard
Calculator
[6 marks]

A random sample of 40 light bulbs has mean lifetime 1180 hours with sample standard deviation 90 hours.

(a)(i) Find the lower bound of a 95% confidence interval for the population mean lifetime.

(a)(ii) Find the upper bound.

(b) Interpret this interval in context.

(c) A manufacturer claims the mean lifetime is 1220 hours. Comment on this claim using your interval.

Worked solution

(a)(i) Using a \(t\)-interval with \(n=40,\ \bar x=1180,\ s=90:\) M1
CI lower bound \(\approx1151\) hours. A1

(a)(ii) Upper bound \(\approx1209\) hours. A1

(b) We are 95% confident the true mean lifetime lies between 1151 and 1209 hours. A1

(c) 1220 lies outside the interval, R1
so the data provide evidence against the manufacturer's claim. A1

M1 Setting up the t-interval for the population mean using n=40, x̄=1180, s=90 A1 Correct lower bound of the 95% confidence interval, 1151 hours A1 Correct upper bound of the 95% confidence interval, 1209 hours A1 Correct contextual interpretation of the confidence interval R1 Valid observation that the claimed value 1220 lies outside the interval A1 Correct conclusion that the data give evidence against the manufacturer's claim

Common mistakes

The four slip-ups that account for most of the marks lost on this topic - worth reading before you start practising, not just after you get one wrong.

  • Saying "there's a 95% probability the true mean is in this interval." The true mean is fixed, not random - the 95% refers to the long-run procedure across repeated samples, not a probability attached to this one interval.
  • Using a z-interval when \(\sigma\) is unknown. If you only have a sample standard deviation \(s\), IB requires the \(t\)-distribution regardless of how large the sample is - using \(z\) instead gives an interval that's slightly too narrow.
  • Forgetting that \(\text{df} = n-1\), not \(n\). The degrees of freedom for a \(t\)-interval is one less than the sample size - using the wrong df pulls the critical \(t\)-value (and the interval) off slightly.
  • Confusing the margin of error with the full width. The margin of error is half the interval's width, measured from the centre out to one end - reporting the whole width as "the margin of error" is a common slip.

Using your GDC

Every step below is a real button sequence, not a vague "use your calculator" hint - covering the TI-84 Plus, TI-Nspire, and Casio fx-9860/fx-CG50. Pick your model to filter down to just the steps that apply to you.

Show steps for:
Confidence interval for a mean (TInterval)

Builds the whole t-interval (or z-interval) in one step from either summary statistics or a raw data list - no critical-value tables needed.

  1. Decide whether you have summary statistics (\(\bar{x}, s, n\)) or a raw data list, and set the confidence level (C-Level) the question asks for.
  2. STAT → TESTS → TInterval. Choose Stats (enter \(\bar{x}, s, n\)) or Data (enter a list); set C-Level, then Calculate.TI-84
  3. menu → Statistics → Confidence Intervals → t Interval. Choose Stats or Data, enter the values and C-Level.Nspire
  4. Statistics → INTR (F4) → T → 1-Sample. Choose Data or Variable, enter the values and C-Level.Casio
  5. Read the lower and upper bounds directly from the output - do not round the intermediate mean or standard deviation before this step.
  6. The margin of error is half the difference between the two bounds.

Tip: Example: \(\bar{x}=250,\ s=18,\ n=60,\) C-Level \(=0.95\) gives \((245,\ 255)\). With raw data, entering the list directly (e.g. \(L_1=\{21,23,20,24,22,22\}\)) and choosing Data lets the GDC find \(\bar{x}\) and \(s\) itself.

One-variable statistics (mean, median, standard deviation)

Instant summary statistics from a list - the sample mean and standard deviation feeding directly into a confidence interval.

  1. Enter the data into a list.
  2. STAT → Edit → type values into L1. Then STAT → CALC → 1:1-Var Stats, choose L1, Calculate.TI-84
  3. Add a Lists & Spreadsheet page, name a column and enter data; then a Calculator page → menu → Statistics → Stat Calculations → One-Variable Statistics.Nspire
  4. Statistics menu → enter data in List 1 → CALC (F2) → 1-VAR.Casio
  5. Read x̄ (mean) and Sx (sample standard deviation) - these are the \(\bar{x}\) and \(s\) a t-interval needs.

Tip: Sx vs σx: for a confidence interval always use Sx (the sample standard deviation), not σx.

See the full GDC guide for more calculator models and topics.

Ready to practise properly?

Confidence interval questions, marked instantly like the real exam.

Quick answers

The questions students on this topic ask most often.

When do I use a t-interval instead of a z-interval?

Use the t-interval whenever the population standard deviation is not known and you only have a sample standard deviation s - which is almost always the case in exam questions. IB explicitly requires the t-distribution here regardless of how large the sample is. The z-interval is only used on the rare occasion the population standard deviation is actually given.

What's the difference between the margin of error and the width of a CI?

The width is the full length of the interval, from lower bound to upper bound. The margin of error is half of that - the distance from the sample mean out to either endpoint. A confidence interval is always written as (point estimate) ± (margin of error).

Does a wider confidence interval mean I'm more confident in the exact value?

No - a wider interval reflects more uncertainty about exactly where the true mean lies, not more confidence in a precise value. A higher confidence level (say 99% instead of 90%) makes the interval wider because it has to capture the true mean more often across repeated samples.

What does "95% confidence" actually mean?

It describes the long-run procedure, not one specific interval: if you repeated the sampling process many times and built a confidence interval from each sample, about 95% of those intervals would contain the true population mean. It is not a 95% probability that the true mean lies in this particular interval.

Sub-topics

Confidence Intervals broken down into its individual skills, each with its own focused page.