On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Statistics & Probability · Grade 9-12

Confidence Interval

A confidence interval is a range computed from sample data that's likely to contain the true population parameter, at a chosen confidence level (often 95%).

xˉ±z∗⋅sn

Quick Answer

A confidence interval is a range computed from sample data that's likely to contain the true population parameter, at a chosen confidence level (often 95%). Use it whenever a sample stands in for a population and you want to report how precise the estimate is: average screen time from a survey, the share of voters backing a candidate. For a mean, compute xˉ±z∗sn; the confidence level sets z∗, and a bigger sample makes the interval narrower.

Why This Matters

A single number from a sample, like "average sleep is 7.1 hours," hides how far off it might be. An interval like 6.8 to 7.4 hours shows how precise the survey was, and lets readers judge whether two groups really differ. Misreading it is common: the 95% describes how often the method captures the truth across many samples, not the chance for one interval already computed.

Intuitive Explanation

You measure 100 randomly chosen students and get an average height of 170 cm with s=10 cm. The true mean of all students is unknown, but sample means of 100 vary with standard error 10100=1 cm, and about 95% of them land within 1.96 standard errors of the true mean. Turn that around: for 95% of samples, the true mean lies within 1.96 cm of the sample mean. So you report 170±1.96, the interval from 168.04 to 171.96 cm.

The 95% belongs to the method. If 100 survey teams each drew their own sample and built their own interval, about 95 of the intervals would contain the true mean and about 5 would miss it. Any one team's interval either contains it or doesn't; nobody can tell which. That is why "there is a 95% chance the true mean is in (168.04, 171.96)" is the wrong reading.

Two dials set the width. A higher confidence level needs a bigger z∗ (1.645 for 90%, 1.96 for 95%, 2.576 for 99%), which widens the interval. A bigger sample shrinks sn, and quadrupling n halves the width. An interval is also different from a hypothesis test, which starts from one claimed value and asks whether the data rule it out, instead of estimating a range.

Think of it like this. A confidence interval is a ring toss around a peg you can't see. The peg is the true value, and your sample decides where the ring lands. A 95% method uses a ring sized so that 95% of tosses catch the peg. A bigger ring catches more often but says less about where the peg is, and a ring that has landed either holds the peg or doesn't.

Core idea. A confidence interval is a range from sample data that likely contains the true population value, at a stated confidence level.


When to Use

Use a confidence interval when a question asks you to estimate a population mean or proportion from a sample and to show the uncertainty, often with words like "95% confident" or "plausible values." If the question gives a claimed value and asks whether the data contradict it, use a hypothesis test. If it asks only for the plus-or-minus part, that is the margin of error. If it asks how spread out individual values are, that is the standard deviation.

Tip. Ask: Am I building a range from a sample that likely contains the true population value at a stated confidence?

How to Recognize It

Check what the answer should look like: two endpoints, one plus-or-minus number, a verdict on a claimed value, or a description of how scattered individual values are.

  1. Is the unknown a population mean or proportion that you must estimate from a sample, with no claimed value to check?

    Yes calls for a confidence interval, estimate ± margin. If the problem states a value, such as a claim that the mean is 500 mL, and asks whether the data contradict it, run a hypothesis test instead.

  2. Does the question want both endpoints of the range?

    Yes means report the full interval, such as 46% to 52%. If it wants only how far the estimate might be off, the 3 points in that example, it is asking for the margin of error, half the width.

  3. Is the population standard deviation σ unknown and the sample small, say under 30?

    Yes means use the critical value t∗ with n−1 degrees of freedom in place of z∗; it is larger and gives a wider interval. For large samples the two are almost equal, which is why z∗ is often used.

  4. Is the question about how spread out individual values are, rather than where the population mean is?

    Yes is a standard-deviation question, and the answer describes the data, not a parameter. A confidence interval for the mean narrows as n grows; the spread of individual values does not.

Confidence Interval compared with Margin of error, Hypothesis testing, and Standard deviation

All four rows use a sample's spread but report different things. Ask for the answer's shape: a range for the parameter (confidence interval), its plus-or-minus half-width (margin of error), a verdict on one claimed value (hypothesis test), or the scatter of individual values (standard deviation).

Confidence Interval

Meaning
Use this when you want to estimate a population parameter as a range with a stated confidence level.
Key test
Am I building a range from a sample that likely contains the true population value at a stated confidence?
Formula
xˉ±z∗⋅sn
Example
A sample of n=100 has mean xˉ=170 cm and SD s=10 cm. Find a 95% confidence interval for the population mean.

Margin of error

Meaning
Half the interval's width — the ± part, not the full range.
Key test
Use when you want just the wiggle room, not the endpoints.
Formula
E=z∗sn
Example
±3% in a poll

Hypothesis testing

Meaning
Decides whether to reject a specific claimed value, not estimate a range.
Key test
Use when testing a claim like 'μ=170?', not estimating μ.
Formula
z=xˉ−μ0σ/n
Example
Is the mean really 170?

Standard deviation

Meaning
Measures spread of the data, not a range for a parameter.
Key test
Use when describing variability of values, not estimating the mean.
Formula
σ
Example
How spread out heights are

Formula & Notation

xˉ±z∗⋅sn
xˉ±z∗⋅sn where P(−z∗<Z<z∗)=1−α for confidence level 1−α

How to read it: z∗ is the critical value (e.g., 1.96 for 95% confidence); s is the sample standard deviation.

Worked Examples

Example 1 — Build a 95% interval

Easy

A sample of n=100 has mean xˉ=170 cm and SD s=10 cm. Find a 95% confidence interval for the population mean.
Show the steps and the answer
  1. Find the standard error: sn=10100=1 cm.

    The width depends on how much sample means vary, not on how much individual heights vary.

  2. Use z∗=1.96 for 95% confidence.

    95% of a normal distribution lies within 1.96 standard deviations of its center.

  3. Margin: 1.96×1=1.96 cm.

    This is how far the estimate may reasonably be from the truth at this confidence level.

  4. Interval: 170−1.96=168.04 to 170+1.96=171.96 cm.

    The margin is centered on the sample mean, the best single estimate.

Answer: (168.04, 171.96) cm

Takeaway: Estimate ± critical value × standard error, with each piece doing its own job.

Example 2 — Testing a claim, not estimating

Standard

Someone claims the mean height is 175 cm. With the same sample, decide whether to reject that claim.
Show the steps and the answer
  1. Notice that this asks for a verdict on one specific value, which is a hypothesis-test question.

    The task is a yes/no decision about μ=175, not an estimate.

  2. Measure the gap in standard errors: z=170−1751=−5.

    A sample mean 5 standard errors below the claimed mean would almost never occur if the claim were true.

  3. Cross-check with the interval: 175 lies outside (168.04, 171.96).

    A value outside the 95% interval is rejected by a two-sided test at the 5% level, so both routes agree.

Answer: Reject — 175 lies far outside the interval (168,172)

Takeaway: An interval estimates; a test decides about a claimed value. Values outside the 95% interval are rejected at the 5% level.

Example 3 — Find the mistake: SD in place of standard error

Application

A survey of n=64 students finds mean nightly sleep xˉ=7.2 hours with s=1.6 hours. Lena writes the 95% confidence interval as 7.2±1.96(1.6)=(4.06, 10.34) hours. Find the mistake and correct it.
Show the steps and the answer
  1. Read what Lena's interval claims: the average for all students is somewhere from about 4 to 10 hours.

    That range describes where individual students fall, which is far too wide for an average estimated from 64 people.

  2. Find the standard error: sn=1.664=1.68=0.2 hours.

    The interval is about the mean, so it uses the spread of sample means, not of students.

  3. Margin: 1.96×0.2=0.392 hours.

    Same critical value, now applied to the right spread.

  4. Interval: 7.2±0.392=(6.808, 7.592), about (6.81, 7.59) hours.

    It is 8 times narrower than Lena's because 64=8.

Answer: (6.81, 7.59) hours

Takeaway: An interval for a mean uses sn; using s alone gives a range for individuals, not for the average.

Where You'll See It

  • A poll that can't call a majority

    A poll of 1,000 voters finds 52% support. A 95% interval for the proportion is 0.52±1.960.52×0.481000≈0.52±0.031, so 48.9% to 55.1%. Because the interval includes 50%, the poll can't show the candidate has a majority.

  • Reading a blood-pressure drug trial

    A trial reports that a drug lowers blood pressure by 8 mmHg on average, with a 95% interval of 5 to 11 mmHg. Doctors read the whole range: even the low end is a useful drop, so the result supports prescribing it. An interval of −2 to 18 mmHg would leave open that the drug does nothing.

  • Battery claims in phone reviews

    A lab tests 50 phones and finds mean battery life 14.2 hours with s=2.2 hours. The 95% interval is 14.2±1.96×2.250≈14.2±0.6, or 13.6 to 14.8 hours, which tells readers how far to trust the headline number.

Common Mistakes

  1. The slip: Saying '95% chance the true value is in THIS interval'

    Instead: the parameter is fixed; 95% refers to the procedure over many samples.

  2. The slip: Using the data's SD as the spread of the estimate

    Instead: the interval uses the standard error sn, not s alone.

  3. The slip: Picking the wrong critical value

    Instead: z∗=1.96 for 95%, not for 90% or 99%; match z∗ to the confidence level.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. A sample has n=64, xˉ=52 and s=8. Find a 95% confidence interval for the population mean.

    Hint: Find the standard error first, then multiply by 1.96.

  2. A sample has n=25, xˉ=30 and s=10. Find a 90% confidence interval using z∗=1.645.

    Hint: Compute sn, then multiply by 1.645.

  3. A 95% confidence interval for mean sleep is (6.8,7.6) hours. Find the sample mean and the margin of error.

    Hint: The estimate is at the center of the interval.

  4. In a poll of 400 voters, 55% support a plan. Find a 95% confidence interval for the true proportion.

    Hint: Use p^±1.96p^(1−p^)n.

  5. A sample of 49 has xˉ=160 cm and s=14 cm. To find a range likely to contain the population mean, use xˉ±1.96s or xˉ±1.96sn?

    Hint: One range describes individual people; the other describes the estimate of the mean.

  6. A 95% confidence interval for mean commute time is (22,28) minutes. Lu says: "There is a 95% chance the true mean is between 22 and 28." Correct the statement.

    Hint: Is the true mean random, or is the interval random?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Why not use a 99% interval every time, to be safer?

Because certainty costs precision. With the same data, z∗z^* goes from 1.96 at 95% to about 2.576 at 99%, so the interval becomes about 31% wider. Push toward 100% and the interval grows until it says nothing useful, like a mean height somewhere between 0 and 3 metres. The 95% level is a common compromise between being right often and being specific enough to act on.

If I take a sample 4 times as large, what happens to the interval?

It becomes half as wide, not a quarter as wide. The width depends on sn\frac{s}{\sqrt{n}}, and 4=2\sqrt{4}=2. So a poll of 400 people with a margin of about 5 points needs 1,600 people to reach about 2.5 points. This square-root rule is why extra precision gets expensive quickly, and why most national polls stop at around 1,000 to 2,000 people.

What does it mean if a 95% interval for the difference between two groups includes 0?

It means no difference is among the plausible values, so the data do not show convincingly that the groups differ. If an interval for the difference in mean test scores runs from −2-2 to 5 points, the second group might be 2 points worse or 5 points better. This matches a two-sided test at α=0.05\alpha=0.05, which would fail to reject the null hypothesis of no difference.

Learning Path

Confidence Interval

You are here

You need the Sampling Distribution, the Central Limit Theorem (why xˉ is roughly normal) and Z-Scores (critical values such as 1.96) first. A confidence interval combines them into a range of plausible values for an unknown parameter. Next, the Margin of Error isolates the ± part and shows how sample size controls it, and Hypothesis Testing uses the same sampling distribution to judge one claimed value.

See Also