James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
IB Diploma › Maths AI HL › Statistics & probability › Confidence intervals & CLT

Confidence intervals & the central limit theorem

A sample mean is a single best guess at the population mean, but it will almost never be exactly right. A confidence interval gives a range of plausible values instead. The central limit theorem explains why this works even when the population is not normal.

AHL 4.15AHL 4.16HL onlyPaper 1Paper 2Paper 3GDC allowed≈ 50 min to work through
Before you start: the normal distribution and X¯~N(μ,σ2n) (Combining random variables), and the t-test (The t-test).

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • State the central limit theorem and use it for samples with n>30AHL 4.15
  • Find probabilities about a sample meanAHL 4.15
  • Find a confidence interval for a mean using the normal distribution when σ is knownAHL 4.16
  • Find a confidence interval for a mean using the t-distribution when σ is unknownAHL 4.16
  • Interpret a confidence interval in context, and use it to judge a claimAHL 4.16
  • Explain how the width depends on the confidence level and the sample sizeAHL 4.16

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

Take many samples and build a 95% confidence interval from each one. About 95% of those intervals will contain the true mean μ and about 5% will miss it. For one interval you cannot know which kind it is, but the method is right 95% of the time. That is what "95% confident" means.

2.1 The central limit theorem

Central limit theorem Not in booklet: learn it

For a random sample of size n from any distribution with mean μ and variance σ2, the sample mean is approximately normal for large n:

X¯≈N(μ, σ2n)

In exams, n>30 is large enough. If the population is itself normal, X¯ is exactly normal for any n.

Worked example 1Paper 1
Waiting times at a clinic have mean 4.2 minutes and standard deviation 1.5 minutes; the distribution is skewed. For a random sample of 40 waiting times, find P(X¯>4.5).
n=40>30, so by the CLT X¯≈N(4.2,1.5240)
The skewness does not matter for the mean of a large sample.
P(X¯>4.5)=0.103

2.2 Confidence intervals when σ is known

Confidence interval for μ Not in booklet: learn it
σ known:  x¯±zσnσ unknown:  x¯±tsn−1n

For 95%, z=1.96; for 90%, z=1.645; for 99%, z=2.576. The t value depends on the degrees of freedom, n−1. In the exam the GDC does all of this.

Worked example 2Paper 1
Bottles are filled by a machine with standard deviation 2.5 ml. A sample of 25 bottles has mean 31.4 ml. Find a 95% confidence interval for the population mean.
31.4±1.96×2.525=31.4±0.98
(30.4, 32.4)
zInterval on the GDC.

2.3 Confidence intervals when σ is unknown

If the population standard deviation is not known, estimate it with sn−1 and use the t-distribution with n−1 degrees of freedom, whatever the sample size. The t value is larger than z, so the interval is wider: we are less sure because σ is estimated too.

Worked example 3Paper 2
The masses (g) of 8 randomly chosen chocolate bars are 47.2, 49.1, 50.3, 48.8, 51.0, 49.6, 48.2 and 50.4. Assuming the masses are normally distributed, find a 95% confidence interval for the mean mass. The wrapper says 50 g. Comment.
x¯=49.325, sn−1=1.259
tInterval: (48.3, 50.4)
t=2.365 with 7 degrees of freedom.
50 is inside the interval, so the claim of 50 g is plausible.
Worked example 4Paper 1
For the same data, find a 90% interval and explain why it is narrower.
(48.5, 50.2)
Less confidence needs a smaller t value, so a narrower interval.

2.4 Interpreting and planning

Say what the interval means in context: "we are 95% confident that the mean mass of all bars lies between 48.3 g and 50.4 g". If a claimed value lies outside the interval, the data give evidence against it. The width is 2zσn: to halve the width you need four times as large a sample.

Worked example 5 (faded)Paper 1
With σ=2.5, how large a sample gives a 95% interval of width at most 1?
2×1.96×2.5n≤1⇒n≥96.04, so n= 97  ← you work this out
On your TI-Nspire Calculator tricks →

On the TI-Nspire, menu → Statistics → Confidence Intervals. Use z Interval when σ is known and t Interval when it is not. Choose Data if you have a list, or Stats to type in x¯, the standard deviation and n. Set the C Level (0.95 for 95%). The output gives the lower and upper bounds, x¯ and the margin of error.

3Explore it

Each line is a confidence interval from a new random sample of a population with true mean μ = 50 (dashed). Intervals that miss μ are red. Move a slider to draw new samples; about the stated percentage should contain μ in the long run.

4Common mistakes & exam tips

Common mistakes

  • Using the normal distribution when σ is unknown. With sn−1, always use t.
  • Saying "there is a 95% probability that μ is in this interval". μ is fixed; it is the method that is right 95% of the time.
  • Using sn (σx) instead of sn−1 (sx) in a t-interval.
  • Applying the CLT to a single observation. It is about the mean of a large sample.
  • Forgetting the square root: the standard deviation of X¯ is σn.

Exam tips

  • State which interval you used and why: "t-interval, since σ is unknown".
  • Give interval bounds to 3 significant figures, but keep full accuracy in between.
  • "Comment on the claim": say whether the claimed value is inside or outside the interval, and what that suggests.
  • "Justify using the CLT": the sample size is large (n>30).

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
X¯ is the mean of 50 values from a population with mean 20 and standard deviation 6. State the approximate distribution of X¯.
N(20,3650)=N(20, 0.72)
FluencyP2
A sample of 36 has x¯=82.5, and σ=4.8. Find a 95% confidence interval for μ.
82.5±1.96(0.8): (80.9, 84.1)
FluencyP3
A 95% confidence interval is (12.4, 15.0). Find the sample mean and the margin of error.
x¯=13.7, margin 1.3
FluencyP4
Explain why a 99% confidence interval is wider than a 95% one from the same data.
Being more confident of capturing μ needs a wider range.
Problem solvingP5
A 95% interval from n=25 has width 4. Estimate the width with n=100.
Width ∝1n: 4×25100=2
Problem solvingP6
A t-interval for the mean time to complete a puzzle is (5.2, 6.8) minutes. The puzzle maker claims the mean is 7 minutes. Comment.
7 is outside the interval, so the data give evidence that the mean is less than 7 minutes.

6Exam-style questions

Original questions in the style of the IB Maths AI HL exam, with full markschemes. Your GDC is allowed throughout: use it, but write down what you entered and what it gave you. Give yourself about 1 minute per mark.

Question 1Paper 1[5 marks]

The masses of loaves from a bakery are normally distributed with standard deviation 9 g. A random sample of 20 loaves has mean mass 412 g.

  • (a)Find a 95% confidence interval for the mean mass of all loaves.[2]
  • (b)The bakery claims that the mean mass is 415 g. Comment on this claim.[2]
  • (c)Explain why the normal distribution, and not the t-distribution, is used here.[1]
(a)
408.1A1
415.9A1
(b)
415 lies inside the intervalR1
so the claim is plausibleA1
Award R1A0 for "the claim is true".
(c)
the population standard deviation is knownR1
Question 2Paper 1[6 marks]

The times, in minutes, for ten randomly chosen students to complete a task are 18.2, 19.5, 17.8, 20.1, 18.9, 19.4, 18.0, 19.0, 18.6 and 19.7. The times are assumed to be normally distributed.

  • (a)Find unbiased estimates of the mean and the standard deviation of the times.[2]
  • (b)Find a 90% confidence interval for the mean time.[2]
  • (c)The task designer claims that the mean time is 19.5 minutes. Comment on this claim.[2]
(a)
18.92A1
0.767A1
(b)
(18.5, 19.4)A2
Award A1 for one correct bound. Award A0 for a z-interval.
(c)
19.5 is outside (above) the intervalR1
so there is evidence that the mean time is less than 19.5 minutesA1
Question 3Paper 2[9 marks]

The time customers spend waiting on a phone line has mean 6.5 minutes and standard deviation 4 minutes. The distribution of waiting times is strongly skewed.

  • (a)A random sample of 40 waiting times is taken. Find the probability that the sample mean is more than 7.5 minutes.[3]
  • (b)Justify the method you used in part (a).[1]
  • (c)After changes to the system, a new random sample of 40 calls has mean 6.9 minutes and standard deviation sn−1=3.8 minutes. Find a 99% confidence interval for the new mean waiting time.[2]
  • (d)Using σ=4, find the smallest sample size for which a 95% confidence interval for the mean has width at most 2 minutes.[3]
(a)
X¯≈N(6.5,1640)(M1)(A1)
0.0569A1
(b)
n=40>30, so the central limit theorem appliesR1
(c)
(5.27, 8.53)A2
(d)
2×1.96×4n≤2(M1)
n≥61.5(A1)
n=62A1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you are scoring well above, try these real IB Maths AI HL questions on this topic. Your school or teacher will have the papers.

PaperQuestionFocusDifficulty
May 2025 · TZ2 · Paper 1Q6Coral reef temperatures: unbiased variance and a 95% interval★☆☆
May 2023 · TZ2 · Paper 1Q15Coffee packets: unbiased estimates and a confidence interval★★☆
May 2021 · TZ2 · Paper 1Q10Chocolates per packet: interval from summary statistics★★☆
May 2025 · TZ1 · Paper 3Q2Weights of eggs: intervals and tests in context★★★
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake