FR EN

INF-2: Confidence Intervals for a Mean

Module 4 · Statistical Inference

Section 1: Introduction

You’ve just finished INF-1, where you learned that a sample mean is itself a random variable — if you took a different sample, you’d get a different value. The Central Limit Theorem tells us is approximately normally distributed around the true population mean .

But here’s the real-world problem: you almost never know . You have one sample, one , and you need to say something useful about the unknown truth. How close is your estimate? How uncertain are you?

A confidence interval is the answer. Instead of reporting a single number (“the mean delivery time is 31.4 minutes”), you report a range: “I am 95% confident the true mean delivery time is between 29.8 and 33.0 minutes.” That range quantifies your uncertainty in a statistically principled way.

This lesson teaches you to construct, interpret, and use confidence intervals for a population mean when the sample is large. Everything here builds on the CLT from INF-1 — if that lesson is solid, this one will feel natural.

After this lesson, you will be able to:

  • Construct a confidence interval for using the formula
  • State the correct frequentist interpretation of a confidence interval and identify the most common misinterpretation
  • Choose the appropriate critical value for 90%, 95%, and 99% confidence levels
  • Explain how confidence level, sample size, and population variability affect interval width
  • Determine the minimum sample size needed to achieve a desired margin of error using

This is Lesson inf-2. The next lesson (inf-3) extends this to the case where is unknown and the t-distribution is required. Master the framework here first.

Section 2: Prerequisites

Confidence intervals are a direct application of the Sampling Distributions you studied in INF-1.

  • From INF-1: Standard Error (SE). . This measures the typical “error” or distance between the sample mean and the population mean .
  • From INF-1: The CLT Guarantee. If , the sampling distribution of is approximately normal, regardless of the population’s shape.
  • Critical Z-Values: For a given confidence level, is the number of standard errors you must go out from the mean to capture that percentage of the distribution.
  • Normal Table Fluency: You must be able to find a z-score given an area (inverse lookup).

Retrieval Checkpoint

If a sampling distribution is normal and we want to capture the middle 95% of all possible sample means, how many standard errors (SE) away from the mean must we go in both directions?

Success Factor:

  • If you cannot calculate the Standard Error () correctly, your confidence interval will be too wide or too narrow. Ensure you are using and not just in the denominator.

Retrieval Warm-up — from earlier lessons

The heights of adult women in a city are normally distributed with cm and cm. Using a z-table where and , what fraction of women are between 160 and 172 cm tall?

You take a random sample of women from the same population ( cm, cm). What is the standard error of the sample mean, and what does it tell you?

Section 3: Core Concepts

C1 — From Point Estimate to Interval Estimate

When you compute from a sample, you get a point estimate of . It’s your single best guess. But it’s almost certainly not exactly right — a different sample would give a different . A point estimate alone gives you no information about how wrong you might be.

An interval estimate (confidence interval) attaches a range to your estimate: . The “something” is the margin of error — it quantifies the precision of your estimate.

Margin of Error

The margin of error is the half-width of the confidence interval. It equals the critical value times the standard error:

A smaller margin of error means a more precise (narrower) interval. It decreases when you increase or accept a lower confidence level.


C2 — Constructing the Confidence Interval

The confidence interval for is built by going standard errors out from in both directions:

Confidence Interval for μ (Large Sample, σ Known)

which gives the interval:

Conditions required:
  • Random sample (to justify probability calculations)
  • or the population is approximately normal (for the CLT to apply)
  • is known (if unknown and , substitute — see inf-3 for the exact t-distribution approach)
Figure 3: The perspective flip. Panel A (INF-1 view) shows the sampling distribution centred at the known μ — x̄ is the random quantity. Panel B (INF-2 view) shows the same ±z*·SE geometry centred at the observed x̄ — μ is the fixed target. Click New sample to draw a random x̄ and observe that both panels always agree: the same algebraic condition determines whether the middle-region is satisfied.

The three ingredients you need are: (1) your sample mean , (2) the standard error , and (3) the critical value that matches your desired confidence level.


C3 — Critical Values for Common Confidence Levels

The critical value is the z-score that captures the middle C% of the standard normal distribution. For a 95% CI, you want to leave 2.5% in each tail, so is the value with left-tail area 0.975.

Confidence LevelTail area each sideCritical value
90%0.051.645
95%0.0251.96
99%0.0052.576

These three values are worth memorizing — they appear in every inference problem through this module. They are not magic constants: each is derived from the standard normal table you studied in PR-6. For a 95% CI, the middle 95% leaves 2.5% in each tail, so you need the z-score where ; a normal table gives . Challenge 4 in Section 9 walks through this derivation step by step — and shows you how to find for any confidence level, not just the three above.

Figure 4: The anatomy of z*. The blue region contains the middle C% of the standard normal distribution; the orange tails together hold the remaining (1−C)%. The dashed lines mark ±z* — a distance along the z-axis, not an area. Toggle confidence levels to see how z* is derived from the inverse cumulative normal.

Students sometimes confuse confidence level with z-score direction. For a 95% CI: the middle 95% of the standard normal spans from to . The critical value is 1.96, not 0.95 and not the z-score for 0.95 (which would be 1.645 — the 90% critical value). Always look up z* as the value where left-tail area = , where (confidence level).


C4 — The Correct (Frequentist) Interpretation

This is the most commonly misunderstood concept in elementary statistics. Read it carefully.

What a Confidence Interval Means

A 95% confidence interval does not mean: “There is a 95% probability that lies in this interval.”

The true population mean is a fixed (though unknown) constant — it doesn’t have a probability of being anywhere. Once you’ve computed your interval, either is or isn’t inside it.

The correct statement is: “If we repeated this procedure many times — each time drawing a new sample and computing a new interval — about 95% of those intervals would contain .”

The 95% refers to the process, not to any single interval.

Accepted shorthand. In textbooks, reports, and the rest of this course you will also read: “We are 95% confident that the true mean lies between [L] and [U].” This phrasing is correct and widely used — it is shorthand for the longer procedure-language statement above. Read it that way; do not interpret it as assigning a probability to the fixed constant .

Figure 1: CI Coverage Explorer — each horizontal bar is one confidence interval built from a different random sample. Solid green bars capture the true population mean μ (orange dashed line); hatched red bars marked ✗ miss it. Watch the running tally approach the stated confidence level as you draw more samples.

Use the controls to explore: What happens to the width of bars when you increase the confidence level from 90% to 99%? What happens to the capture rate when you switch from 95% to 90%? Notice that individual intervals have no probability attached — the 95% is a property of the procedure, visible only across many repetitions.

Figure 6: Both panels share the same x-axis. Panel A (blue) shows where individual observations fall — the shaded band is ±z*·σ ≈ ±20 units wide and does not change with n. Panel B (green) shows the spread of sample means — the shaded band is ±z*·SE = ±z*·σ/√n, which shrinks as you increase n. This is the sampling distribution, not a confidence interval: the band shows where sample means typically fall, not individual data points.

The most common error in this lesson: “The probability that falls in the interval is 95%.” This is wrong. The probability language applies to the interval (a random quantity, because it depends on your sample), not to (a fixed constant). Say instead: “We used a procedure that captures 95% of the time.”


C5 — What Affects the Width of a Confidence Interval?

The width of a CI is . Three factors determine it:

  • Confidence level ↑ → width ↑: A higher confidence level requires a larger (e.g., 2.576 vs. 1.96). More confidence = wider interval.
  • Sample size ↑ → width ↓: Larger shrinks the SE = . To halve the width, you must quadruple .
  • Population variability ↑ → width ↑: Larger means individual observations are more spread out, so sample means are less precise.
Figure 5: All three intervals share the same centre x̄ on one common scale, so a bar that is twice as wide is drawn twice as long. Drag the n slider to watch every bar shrink together — doubling n reduces each width by 29%; quadrupling n halves all widths (use the 4×n button to see it). Drag σ to see how population variability scales all three proportionally. The relative widths (90% < 95% < 99%) never change because they depend only on z*.

The only factor you control in practice is . You can’t change (it’s a property of the population), and lowering the confidence level to get a narrower interval makes your inference weaker.


C6 — Planning Ahead: Determining Required Sample Size

Before collecting data, you often want to guarantee a maximum margin of error . You can solve for directly:

Minimum Sample Size for a Desired Margin of Error

Set and solve for :

The ceiling function () means always round up to the next whole number — rounding down would give you a margin of error slightly larger than desired.

Required inputs: desired confidence level (gives ), known or estimated , and target margin of error .

Figure 7: The cost of precision. Drag the green dot, click anywhere on the chart, or focus it and use the arrow keys to set your desired margin of error E. The gold dot shows what happens if you halve E — the required sample size approximately quadruples (half the error means roughly 4× the sample), because n scales as 1/E². Notice how the curve accelerates steeply for small E: asking for twice the precision is far more expensive than it looks.

Always round the sample size up, never down. If the formula gives , the answer is 62, not 61. With your margin of error would exceed the target; you need that extra observation to meet the specification.


Now put it all together. Set your sample mean, , , and confidence level, and watch the interval take shape on the number line — the point estimate at the centre, the margin of error reaching out to each bound.

Figure 6: Build a confidence interval. The green tick marks the point estimate x̄; the blue bracket reaches x̄ ± E in both directions, where the margin of error is E = z* · σ/√n. Raise the confidence level and the bracket widens; raise the sample size n and it narrows.

Section 4: Worked Examples

Example 1 — Constructing a 95% CI (Fully Worked)

A coffee shop times the wait from order to pickup. They know from years of records that minutes. A random sample of orders yields minutes. Construct a 95% confidence interval for the true mean wait time .

Step 1 — Verify conditions:
  • Random sample: ✓ (stated)
  • : ✓ CLT applies
  • is known: ✓
Step 2 — Identify the critical value:

Step 3 — Compute the standard error and margin of error:

Step 4 — Build the interval:

Interpretation: We are 95% confident that the true mean wait time is between 3.89 and 4.51 minutes. This means we used a procedure that captures the true mean in about 95% of samples drawn this way.


Example 2 — Using the Sample SD When σ is Unknown (Partially Scaffolded)

A health researcher measures the resting systolic blood pressure of a random sample of adults. The sample yields mmHg and mmHg. The population SD is unknown. Construct a 90% confidence interval.

Note on using s: Since is unknown, we substitute in the SE formula. This is a large-sample approximation valid because . The exact method (t-distribution) will be covered in inf-3.

Before seeing the solution: which value applies to 90% confidence — 1.645, 1.96, or 2.576? What changes in the formula when we use instead of ?

Step 1 — Conditions: , random sample, unknown but available — large-sample approximation valid.

Step 2 — Critical value:

Step 3 — SE and margin of error (using s):

Step 4 — Interval:

Interpretation: We are 90% confident the true mean resting blood pressure of this population is between 124.1 and 131.9 mmHg.


Example 3 — Comparing Widths Across Confidence Levels (Minimally Scaffolded)

A sample of measurements yields and the population SD is . Compute and compare the 90%, 95%, and 99% confidence intervals.

Show Solution

ConfidenceMargin of ErrorInterval
90%1.645(50.17, 54.63)
95%1.96(49.74, 55.06)
99%2.576(48.90, 55.90)

Key insight: All three intervals share the same center . Higher confidence demands a wider interval — you pay for certainty with precision. The 99% interval is about 57% wider than the 90% interval (width 7.00 vs. 4.46).


Example 4 — Determining Required Sample Size (Application Twist)

An airline wants to estimate the true mean baggage weight per passenger to within kg at 95% confidence. From historical data, kg. How many passengers must be sampled?

Show Solution

Interpretation: The airline needs to sample at least 62 passengers to be 95% confident that their sample mean is within ±15 kg of the true population mean.

Check your intuition: What if the airline wanted the same margin of error with 99% confidence?

Going from 95% to 99% confidence requires jumping from 62 to 107 passengers — 73% more data — for the same precision.

Section 5: Guided Practice

Work through each problem step by step. The dropdowns give immediate feedback — wrong answers explain what went wrong.

Problem 1 — Constructing a Confidence Interval (C2 + C3)


Problem 2 — Interpreting Confidence Intervals (C4)

A 95% CI for a mean is (8240, 9760). Which statement is correct?

A 90% CI is (71.3, 76.7). Which statement is correct?

A manager says 95% of customers fall in a CI for mean wait time. Is that correct?

A 99% CI is reported. Which description is correct?

After computing a CI, which statement is correct?


Problem 3 — Determining Required Sample Size (C6)


Problem 4 — Precision vs. Confidence Trade-off (C5)

A sample of measurements yields with known .

Two confidence intervals are constructed from this sample: one at 90% confidence, one at 99%.

Step 1: Which interval is wider?

Step 2: Which interval gives a more precise estimate of ?

Step 3: A colleague argues: “We should always use 99% confidence — more is always better.” Which response is most defensible?

Show computed intervals

Width of 90% CI: . Width of 99% CI: . The 99% CI is 2.54 units wider — about 57% wider for the same data.

Section 6: Independent Practice

No dropdowns — work through each problem fully, then check the solution.

Problem 1 — Large-Sample CI Using s When σ is Unknown (C2 + C3)


Problem 2 — Constructing a Confidence Interval (C2 + C3)


Problem 3 — Sample Size and the Quadruple Rule (C5 + C6)


Problem 4 — Find the False Statement (C4 + C5)

Which claim about a 95% CI is false?

Which width claim is false?

For a 99% CI, which statement is false?

If a 95% CI does not contain a proposed mean, which conclusion is appropriate?

Which change makes a CI narrower while holding the other inputs fixed?

Review Feed


Problem 5 — Full Synthesis: Sodium Intake (C2 + C3 + C4 + C6)


Mixed Review — Normal Probability


Mixed Review — Sampling Distribution

Section 7: Mastery Check

No hints, no scaffolding — these questions measure genuine understanding.

Question 1 — Feynman Test

A friend who hasn’t taken statistics asks: “What does it mean when a news article says ‘margin of error ±3 points at 95% confidence’? How is that calculated and what does the 95% actually mean?”

Write your explanation in plain language (complete sentences, no jargon).

0 / 500
See a model answer

The margin of error (±3 points) tells you how far the reported number might be from the true population value. It’s calculated as: critical value × (population SD / √sample size). The critical value for 95% confidence is 1.96 — a number from the normal distribution.

The “95% confidence” means: if this poll were repeated many times using the same method, about 95 out of every 100 resulting intervals would contain the true value. It does not mean “there’s a 95% chance the true value is in this specific interval” — the true value is fixed; it’s either in there or it isn’t.


Question 2 — Cold CI Construction


Question 3 — Error Analysis


Self-Assessment

How confident are you with the concepts from this lesson?

Still confusedReady for the Boss Fight

Section 8: Boss Fight

Path A — The Analyst


Path B — The Architect

Section 9: Challenge Problems

Challenge 1 — Budget Constraint

Challenge 2 — Lower Confidence

Challenge 3 — Rearrange the Formula

Challenge 4 — Halving E

Challenge 5 — Precision Cost

Challenge 6 — Tail Area

Challenge 7 — Cumulative Lookup Area

Challenge 8 — Reading a z Table

Challenge 9 — CI and a Two-Sided Test

Challenge 10 — Estimate σ Conservatively

Challenge 11 — Nonstandard Confidence

Section 10: Solutions Reference

Complete, step-by-step solutions for all problems in Sections 5–9 are available on the solutions page. Solutions include worked arithmetic, common mistakes to watch for, and interpretation guidance.

View Full Solutions →

If you’re stuck: Re-read the relevant Core Concept in Section 3, then find the Worked Example that maps to that concept (e.g., Example 1 maps to Concept 1). The solutions page shows the reasoning behind every step, not just the final answer.

Quick-Reference Formulas

Confidence Interval for (Large Sample):

If is unknown and , substitute for .

Margin of Error (MOE):

Required Sample Size: (Always round up to the next whole number)

Confidence LevelCritical Value ()
90%1.645
95%1.96
99%2.576