
77.32% of parents see better grades in 3 months!
The confidence interval formula for a population mean is x̄ ± z × (σ/√n). Start from your sample mean, then add and subtract a margin of error. The result is a range that is likely to hold the true population mean.
No sample is perfect. Survey a different group of students and the average changes a little. A confidence interval admits that uncertainty openly: instead of one number, it gives a sensible range plus a stated level of confidence.
The most common levels are 90%, 95% and 99%. Ask for more confidence and the interval gets wider; accept less and it gets narrower.
This guide walks through the z and t formulas, critical values, the margin of error, three worked examples and practice questions. It is written for IB Maths AI students, but it works for any statistics course.
What Is a Confidence Interval?
A confidence interval is a range of values, calculated from sample data, that is used to estimate an unknown population parameter, most often the mean μ.
Say a survey puts the average height of Grade 11 students at 165 cm, and the 95% confidence interval is 162 cm to 168 cm. That means the method used to build the interval catches the true mean in about 95 out of every 100 repeated samples.
Watch the wording: a 95% confidence level does not mean there is a 95% chance that the true mean sits inside this one interval. The true mean is fixed. The 95% describes how reliable the method is across many samples.
What Is the Confidence Level?
The confidence level tells you how often the interval method would capture the true value if you repeated the sampling again and again under the same conditions.
- 90% confidence: a lower bar, so the interval is narrower.
- 95% confidence: the standard choice in most statistics work and in IB questions.
- 99% confidence: a higher bar, so the interval is wider.
Raising the confidence level raises the critical value, which raises the margin of error and stretches the interval.
Confidence Interval Formula
Which version you use comes down to one question: is the population standard deviation σ known, or not?
1. Z-Interval Formula (σ known)
Confidence Interval = x̄ ± z × (σ / √n)
- x̄ = sample mean
- z = critical z-value for the chosen confidence level
- σ = population standard deviation
- n = sample size
- σ / √n = standard error of the mean
If σ is unknown but the sample is large, some textbooks still use z with the sample standard deviation as an approximation. Strictly, though, an unknown σ calls for the t-interval.
2. T-Interval Formula (σ unknown)
Confidence Interval = x̄ ± t × (s / √n)
- x̄ = sample mean
- t = critical t-value from the t-distribution
- s = sample standard deviation (calculated with n − 1)
- n = sample size
- s / √n = estimated standard error
The t-value depends on both the confidence level and the degrees of freedom, df = n − 1.
The t-distribution matters most for small samples where σ is unknown. It assumes the observations are independent and come from a roughly normal population. Its critical values are a little larger than z-values, which widens the interval to cover the extra uncertainty.
3. Confidence Interval Using the Margin of Error
Every confidence interval has the same shape:
Confidence Interval = Sample Estimate ± Margin of Error
- Z-interval: Margin of Error = z × (σ / √n)
- T-interval: Margin of Error = t × (s / √n)
The margin of error is the distance from the sample mean to either end of the interval, so it is also half the interval's width.
Common Critical Z-Values
For two-sided confidence intervals:
- 85% confidence: z = 1.440
- 90% confidence: z = 1.645
- 95% confidence: z = 1.960
- 98% confidence: z = 2.326
- 99% confidence: z = 2.576
These come from the standard normal curve. For 95%, 2.5% is left in each tail, so z is the value with P(Z < z) = 0.975; on a GDC that is invNorm(0.975, 0, 1). For t-intervals, look up the value for your degrees of freedom instead.
How to Calculate a Confidence Interval
Use these steps for any confidence interval for a population mean:
- Find the sample mean: add the observations and divide by how many there are.
- Note the sample size, n.
- Get the standard deviation: use σ if it is given; otherwise calculate s from the sample.
- Choose the confidence level: usually 90%, 95% or 99%.
- Look up the critical value: z from the list above, or t using df = n − 1.
- Work out the standard error: standard deviation ÷ √n.
- Work out the margin of error: critical value × standard error.
- Write the limits: sample mean − margin of error, and sample mean + margin of error.
GDC shortcut: on a TI-84 use STAT → TESTS → ZInterval or TInterval; on a Casio fx-CG50 use STAT → INTR. In an exam, still write one line naming the method you used.
Solved Examples Using the Confidence Interval Formula
Example 1: 85% Confidence Interval for Orange Diameter
A farm in Sharjah picks a random sample of 36 oranges. Their mean diameter is 74 mm, with a standard deviation of 9 mm. Find the 85% confidence limits for the mean diameter of all the farm's oranges.
Solution:
- x̄ = 74 mm, s = 9 mm, n = 36
- Critical value for 85%: z = 1.440
- Standard error = 9 / √36 = 9 / 6 = 1.5
- Margin of error = 1.440 × 1.5 = 2.16
- Lower limit = 74 − 2.16 = 71.84 mm
- Upper limit = 74 + 2.16 = 76.16 mm
Answer: The 85% confidence interval is 71.84 mm to 76.16 mm.
Note: this uses the large-sample z approximation with s in place of σ. If σ is unknown, the t-interval is the stricter method.
Example 2: 90% Confidence Interval for Quiz Scores (t-interval)
Ten IB students score the following marks out of 20 on a calculus quiz:
5, 14, 8, 11, 9, 3, 12, 7, 10, 11
Find a 90% confidence interval for the mean score of all students who sit the quiz.
Step 1: Sample mean
x̄ = (5 + 14 + 8 + 11 + 9 + 3 + 12 + 7 + 10 + 11) / 10 = 90 / 10 = 9
Step 2: Sample standard deviation
- Squared deviations from 9: 16, 25, 1, 4, 0, 36, 9, 4, 1, 4
- Their sum = 100
- s = √(100 / 9) = √11.111 = 3.333
Step 3: Critical t-value
The sample is small and σ is unknown, so use t with df = 10 − 1 = 9. For 90% confidence, t = 1.833.
Step 4: Apply the formula
- Margin of error = 1.833 × (3.333 / √10) = 1.833 × 1.054 = 1.93
- Lower limit = 9 − 1.93 = 7.07
- Upper limit = 9 + 1.93 = 10.93
Answer: The 90% confidence interval for the mean score is about 7.07 to 10.93 marks.
Example 3: 95% Confidence Interval for Student Heights
A random sample of 49 Grade 12 students at a Dubai school has a mean height of 168 cm, with a standard deviation of 7 cm. Find the 95% confidence interval for the mean height of all Grade 12 students.
Solution:
- x̄ = 168 cm, s = 7 cm, n = 49
- Critical value for 95%: z = 1.960
- Standard error = 7 / √49 = 7 / 7 = 1
- Margin of error = 1.960 × 1 = 1.96 cm
- Lower limit = 168 − 1.96 = 166.04 cm
- Upper limit = 168 + 1.96 = 169.96 cm
Answer: The 95% confidence interval is about 166.04 cm to 169.96 cm.
Note: as in Example 1, this is the large-sample z approximation.
Practice Questions on Confidence Interval Formula
Try these before checking the answers.
Question 1: A sample of 64 students has a mean test score of 75. The population standard deviation is known to be 8. Find the 95% confidence interval for the population mean.
Question 2: A sample of 25 observations has a mean of 50 and a sample standard deviation of 10. Find the 95% confidence interval using the t-distribution, with t = 2.064 for 24 degrees of freedom.
Question 3: A sample of 100 has a mean of 120, and the population standard deviation is 15. Find the 90% confidence interval using z = 1.645.
Question 4: If the confidence level goes up and nothing else changes, what happens to the width of the interval?
Question 5: A sample of 36 has a mean of 40 and a standard deviation of 6. Find the margin of error at 95% confidence, using z = 1.960.
Answers
- 73.04 to 76.96 (margin of error = 1.96 × 8/8 = 1.96)
- About 45.87 to 54.13 (margin of error = 2.064 × 10/5 = 4.128)
- About 117.53 to 122.47 (margin of error = 1.645 × 15/10 = 2.47)
- It gets wider, because a higher confidence level needs a bigger critical value, which increases the margin of error.
- 1.96 (1.960 × 6/6)
Applications of Confidence Intervals
Confidence intervals turn up wherever people make decisions from samples.
- Medical research: estimating how well a treatment works, or average recovery times.
- Education: estimating average exam scores and comparing performance between groups or schools.
- Business and marketing: estimating customer satisfaction or the share of people who prefer a product.
- Quality control: checking that product sizes and production figures stay within limits.
- Science and the IB IA: reporting how uncertain an estimate from experimental or survey data is.
Frequently Asked Questions on Confidence Interval Formula
1. What is the confidence interval formula?
With a known population standard deviation, it is x̄ ± z × (σ / √n). When σ is unknown, use x̄ ± t × (s / √n). Here x̄ is the sample mean, σ and s are the population and sample standard deviations, n is the sample size, and z or t is the critical value.
2. What is the z-score for a 95% confidence interval?
z = 1.960 for a two-sided 95% interval. It is the number you multiply the standard error by to get the margin of error.
3. What makes a good confidence interval?
It depends on the study. A narrow interval means a precise estimate; a wide one means more uncertainty. 95% is the usual choice, but higher is not always better, because more confidence means a wider, less precise range.
4. How do you find the z-value?
Read it from a standard normal table or your GDC for the confidence level you need: 1.645 for 90%, 1.960 for 95% and 2.576 for 99%.
Do not confuse it with the z-score of a single data value, z = (x − μ) / σ, where x is the observation, μ the population mean and σ the population standard deviation. That measures how unusual one value is; the critical z-value builds the interval.
5. What is the difference between a z-interval and a t-interval?
A z-interval uses the standard normal distribution and is used when σ is known. A t-interval uses the t-distribution and is used when σ is unknown and s stands in for it. The t-interval is slightly wider to allow for the extra uncertainty.
6. What is the margin of error?
It is the amount added to and taken away from the sample mean: z × (σ / √n) for a z-interval, or t × (s / √n) for a t-interval. It equals half the interval's width.
7. Does a higher confidence level make the interval wider?
Yes. With the same sample size and standard deviation, a higher confidence level needs a bigger critical value. So a 99% interval is wider than a 95% interval from the same data.
8. What is the standard error?
It measures how much the sample mean would vary from one sample to the next. It is σ / √n when σ is known, or s / √n when it is estimated.
Book Your Free Demo Class with MentorMatch
Confidence intervals look simple until one question asks you to pick z or t, find the standard deviation and interpret the answer in words. A MentorMatch tutor works through IB-style statistics questions with you, one-on-one, until each step feels automatic.
- Explore IB Maths AI tutoring
- Find IB Maths tutors in Dubai
- Keep revising with our integration formulas guide

.webp)
.png)
.webp)