Lesson 102 — Confidence Interval for the Mean
Construction and interpretation of confidence intervals for the population mean. Cases z (sigma known) and t-Student (sigma unknown). Margin of error and sample size.
Used in: 3rd year of high school (17-18 years old) · Equiv. Stochastik LK German · Equiv. Math B Japanese · H2 Statistics Singaporean
The confidence interval for transforms the point estimate into a plausible range. Use when is known; use when is estimated from the sample. Increasing the confidence level widens the interval; increasing narrows it.
Rigorous notation, full derivation, hypotheses
Rigorous definition
Pivotal statistic and the CI for mean
"A 95% confidence interval means that if we construct many confidence intervals from many different samples, we expect 95% of those intervals to contain the true population parameter." — OpenStax Statistics, §8.1
Case 1: known (z pivot)
Case 2: unknown (t pivot)
"When the population is not normal but is large, the t distribution still approximates well the behavior of the pivot via the robustness of the CLT." — OpenIntro Statistics, §4.2
Reference quantiles
| Level | |||
|---|---|---|---|
| 90% | 1.645 | 1.699 | 1.833 |
| 95% | 1.960 | 2.045 | 2.262 |
| 99% | 2.576 | 2.756 | 3.250 |
Margin of error and minimum sample size
Worked examples
Exercise list
42 exercises · 10 with worked solution (25%)
- Ex. 102.1ApplicationAnswer key
Height of military recruits: cm, , cm. Construct the 95% CI for average height.
Show solution
. 95% CI: cm. - Ex. 102.2Application
Using the same data as exercise 102.1, construct the 90% and 99% CIs and compare the three levels.
Show solution
90% CI: . CI: cm. 99% CI: . CI: cm. Greater confidence implies wider interval. - Ex. 102.3Application
Weekly work hours: , h, h. Construct the 95% CI using the t distribution.
Show solution
95% CI with : . CI: weekly hours.Show step-by-step (with the why)
- Identify: , , , 95% level.
- Degrees of freedom: . Quantile: .
- Standard error: .
- Margin: .
- CI: hours.
- Trick: With and 95% level, the quantile is 2.064 — slightly larger than 1.960 from . The difference is small, but underestimating uncertainty with would be inadequate for small .
- Ex. 102.4ApplicationAnswer key
A measuring device has units (known). What is the minimum to estimate the mean with maximum margin of error of 3 units at 95% confidence?
Show solution
. Rounds: measurements. - Ex. 102.5ApplicationAnswer key
Tuition of private colleges in a city: dollars, dollars. 95% CI.
Show solution
. . . 95% CI: USD 1,627.10. - Ex. 102.6ApplicationAnswer key
With and 95% CI currently with (amplitude 9.8), what is needed to reduce amplitude to 5?
Show solution
Amplitude = . If quadruples, doubles and amplitude falls in half. For amplitude of 5: . Rounds: . - Ex. 102.7ApplicationAnswer key
If you double the sample size, what is the percentage effect on the margin of error? And if you want to halve the margin, how much should you multiply ?
Show solution
By doubling , multiplies by , so divides by : reduction of 29.3%. To halve , multiply by 4. - Ex. 102.8Application
Notebook battery time: , min, min. 95% CI.
Show solution
. 95% CI with : min. - Ex. 102.9Application
Weight of dogs of a specific breed: , kg, kg. 95% CI.
Show solution
With and : 95% CI = kg.Show step-by-step (with the why)
- The 95% CI formula is .
- With , .
- kg.
- kg.
- CI: kg.
- Note: With only 9 observations, the quantile is substantially larger than 1.96. This reflects greater uncertainty in estimating with few data.
- Ex. 102.10Understanding
The statement "the 95% CI for is [45; 55]" means:
Show solution
In the frequentist view, is fixed — it has no probability of being anywhere. What has 95% probability is the construction procedure: 95% of samples produce an interval that covers . - Ex. 102.11UnderstandingAnswer key
Which of the following actions simultaneously produces a narrower CI AND greater confidence?
Show solution
Narrower CI: increasing narrows the CI (dividing by ). Higher confidence level widens. For the narrowest interval with 99% confidence, one must increase enough to compensate for the larger quantile. Quadrupling compensates exactly for a 2× factor in amplitude — enough to keep the 99% CI as narrow as the 95% CI with original . - Ex. 102.12Application
A tax auditor wants to estimate the mean value of invoices with dollars, margin of error USD 100, and 99% confidence. What is the minimum ?
Show solution
. Rounds: invoices. - Ex. 102.13Application
Monthly food spending of families: dollars, dollars. 95% CI with Student's t.
Show solution
With : . 95% CI: USD 523.40. - Ex. 102.14Application
Compare the t quantiles for and at 95% confidence. Explain why CIs with small samples are much wider.
Show solution
For : ; for : . With , the CI is much wider: the combination of large and small greatly amplifies uncertainty. - Ex. 102.15Application
Daily water consumption of apartments (in liters): 5.2 | 4.8 | 5.5 | 4.9 | 5.1 | 5.3 | 4.7 | 5.0. Construct the 95% CI.
Show solution
Mean: 5.0625 L, L. 95% CI with : L.Show step-by-step (with the why)
- Calculate the mean: L.
- Calculate the sample standard deviation (squared deviations): .
- Sum of squares: .
- ; L.
- . With : .
- CI: L. Trick: With , the quantile is 2.365 — well above 1.96. Uncertainty in is heavy when is small.
- Ex. 102.16Application
Blood glucose: mg/dL (from previous studies). What guarantees a margin of error of 5 mg/dL at 95%?
Show solution
. Rounds: . With 97 samples, the margin of error becomes exactly 5 mg/dL at 95%. - Ex. 102.17Modeling
A union of metalworkers collected salaries of employees: dollars, dollars. The union claims that the true average salary is below USD 1,883. Does the 95% CI support that claim?
Show solution
95% CI: . CI: USD 1,883. The minimum wage (USD 1,412 in 2024) is not in the CI, indicating the sector pays above minimum. The strike is not supported based on this CI if the demand is above USD 1,883; if below, the data are consistent with the demand. - Ex. 102.18ModelingAnswer key
Body temperature of healthy adults: °C, °C. 95% CI. Is the canonical value of 37°C consistent with this data?
Show solution
95% CI: °C. Since 37°C is outside CI (marginally), the data challenge the canonical value. For more robust conclusion, a formal test would be appropriate.Show step-by-step (with the why)
- 95% CI for body temperature: °C, °C, .
- . .
- . CI: °C.
- The canonical value of 37°C is outside the CI (marginally). This suggests the true value may be slightly lower than canonical.
- Fun fact: Recent large-sample studies confirm that human body temperature has declined historically — likely due to improved health conditions reducing chronic inflammation.
- Ex. 102.19Modeling
An economist wants to estimate average quarterly GDP growth with a margin of error of 0.5 percentage points at 95%. If pp (historical variability), how many quarters of data are needed? Discuss practical feasibility.
Show solution
For percentage point and pp (typical GDP variation), . Would need 62 quarters — more than 15 years of data to detect a 0.5 pp difference in GDP growth. With real economic variability, statistical power of short-term studies is limited. - Ex. 102.20Application
A 90% CI has amplitude . How many times wider is the 99% CI for the same sample and the same ?
Show solution
Increasing the confidence level from 90% to 99%, the quantile grows from 1.645 to 2.576. The margin of error increases by ratio , or about 56.6% wider. The CI becomes significantly wider for the same sample. - Ex. 102.21Application
Weekly screen time of teenagers: h, , h. 95% CI. Is the value 10 h/week plausible?
Show solution
95% CI: . CI: hours. The value 10 hours is outside the CI — the data are inconsistent with the hypothesis of average 10 hours. - Ex. 102.22Application
Cholesterol: mg/dL. What for 99% CI with margin of 2 mg/dL?
Show solution
. We want mg/dL. . Rounds: . - Ex. 102.23Application
Battery duration: , h, h. 95% CI. Does the manufacturer's claim of 500 hours average duration support these data?
Show solution
95% CI: hours. Since 500 is outside CI, the data marginally challenge the manufacturer's claim.Show step-by-step (with the why)
- Identify: , hours, hours.
- With , .
- . hours.
- CI: hours.
- The manufacturer claims 500 hours. Since 500 is outside the CI (marginally), the data are marginally inconsistent with the claim. A formal test would be appropriate.
- Note: When , the difference between and is small (2.023 vs. 1.960). For practical purposes, many use when .
- Ex. 102.24UnderstandingAnswer key
What happens to the 95% CI when you increase from 25 to 100, keeping everything else constant?
Show solution
Increasing from 25 to 100 quadruples , doubling . The margin of error falls in half. The confidence level (95%) does not change — it is chosen by the researcher, not by sample size. - Ex. 102.25Modeling
The INSS collected retirement approval cases: days, days. The legal goal is 45 days. Construct the 95% CI and interpret relative to the goal.
Show solution
INSS Report: 95% CI with . days. CI: days. Goal: 45 days. The CI is completely below 45 days — data are strongly consistent with goal achievement. Can report: "With 95% confidence, the true average time for benefits approval is between 34 and 40 days, below the goal of 45 days." - Ex. 102.26Challenge
For data on monthly income of workers, compare the 95% CI for the mean (using t) with the 95% CI for the median (using order statistics). Which is more appropriate to describe "typical" income? Why?
Show solution
For the mean: 95% CI with . For the median: CI based on order statistics — the limits are and where and come from binomial tables. For , the 95% CI for the median uses the 6th and 15th ordered values. For income (skewed distribution with long right tail), the median is more representative than the mean, and the CI for the median is more robust to income outliers. - Ex. 102.27Proof
Formally derive the CI for with known from the symmetry property of the standard normal distribution. Clearly identify what is random and what is fixed in .
Show solution
Derivation: by symmetry of , . Substituting and rearranging: . The endpoints and are statistics (functions of data), while is the fixed parameter. - Ex. 102.28Proof
Prove that when . What are the three properties you need to establish?
Show solution
See the referenced source for detailed resolution. - Ex. 102.29Challenge
Show the duality between CI and hypothesis test: "rejecting at level is equivalent to being outside the CI". Use this duality to explain how a CI can be used as a simultaneous bilateral test for all values of .
Show solution
By the duality theorem: rejecting at level is equivalent to being outside the CI. Therefore, all values of that would NOT be rejected by a bilateral test at level 5% form exactly the 95% CI. The CI can be used as a graphical tool for multiple testing: simultaneously test all hypotheses of the form for every . - Ex. 102.30Application
Among ENEM students from a public school, 65 scored above 700 on the essay. Construct the 95% CI for the true proportion.
Show solution
For proportion, use Wilson's CI: . With , . 95% CI: . CI: . - Ex. 102.31Application
A survey wants to estimate the average number of weekly work hours with h, maximum margin of error of 2 h, and 90% confidence. What is the minimum ?
Show solution
With and 90%: . Rounds: . - Ex. 102.32Application
A camp director collects data from 16 participants on letters received per week: , . Construct the 95% CI.
Show solution
95% CI with : . CI: letters/week. - Ex. 102.33Application
An accounting firm surveys 100 people on weekly leisure hours. Result h with h (known). Construct the 95% CI.
Show solution
95% CI: . CI: weekly hours.Show step-by-step (with the why)
- Identify: , , , 95% level.
- Since is known, use .
- .
- CI: hours.
- Trick: With and known, the pivot is appropriate. The CI has amplitude of 2.74 hours.
- Ex. 102.34Application
A sample of 8 candy sachets has average weight ounces and ounces. Construct the 90% CI for true mean weight. Is the stated value of 2 ounces plausible?
Show solution
90% CI with : . . CI: ounces. The value 2.0 is in the CI — consistent with stated weight. - Ex. 102.35Understanding
What happens to the CI when you increase the sample size , keeping confidence level and fixed?
Show solution
The confidence level is determined by the researcher — increasing does not change it. What changes is the margin of error: . With larger , the CI becomes narrower (more precise) while maintaining the same confidence level. - Ex. 102.36Application
Sleep of 20 campers: h, h. 95% CI for true average sleep.
Show solution
95% CI with : . . CI: hours. - Ex. 102.37ApplicationAnswer key
The standard deviation of heights of young men is approximately inches (known). How many men are needed to estimate average height with a margin of error of 1 inch at 95%?
Show solution
. Rounds: young men. - Ex. 102.38Application
A study of 21 students recorded average sleep of h with h. Construct the 90% CI and check if 7 hours of sleep is a plausible value.
Show solution
90% CI with : . . CI: hours. The value 7 hours is within the CI, so the data are consistent with the hypothesis of average sleep of 7 hours. - Ex. 102.39Modeling
Records from 35 flights show average of 11.6 empty seats per flight, with . Construct the 95% CI and interpret from an overbooking policy perspective.
Show solution
95% CI: empty seats per flight. With average of 11.6 empty seats, airlines should reduce overbooking to cover at least 13 seats.Show step-by-step (with the why)
- Identify: , seats, seats.
- With , use .
- .
- .
- CI: empty seats.
- Interpretation: In 95% of samples of this size, the CI constructed this way would capture the true average number of empty seats.
- Ex. 102.40ModelingAnswer key
A survey of 400 drivers revealed that 320 always wear seatbelts. Construct the 95% CI for the true proportion of drivers who always wear seatbelts.
Show solution
95% CI for proportion with : . . CI: . Interpretation: we are 95% confident that between 76.1% and 83.9% of drivers always wear seatbelts. - Ex. 102.41Modeling
Heights of men: group A (, inches, ) and group B (, inches, ). Construct the 95% CI for the difference of means .
Show solution
Standard error of difference of means: . 95% CI: cm. The CI does not include 0, indicating the difference is statistically significant. - Ex. 102.42Challenge
Describe the bootstrap percentile method for constructing a 95% CI for the mean. What are the advantages over the Student's t-based CI? In which situations would bootstrap be especially recommended?
Show solution
The bootstrap percentile: (1) re-samples 2000 times with replacement from ; (2) calculates in each replicate; (3) uses 2.5% and 97.5% percentiles of bootstrap means as limits of 95% CI. Advantages: requires no normality assumption nor knowledge of ; valid for any statistic (median, ratio, correlation). Limitation: requires computation; for very small samples (), may have inadequate coverage.
Sources
- OpenIntro Statistics (4th ed.) — Diez, Çetinkaya-Rundel, Barr · CC-BY-SA. Sections §4.2–4.4 (CI for means, duality with tests, sample size).
- Statistics (OpenStax) — Illowsky, Dean · CC-BY. Chapter 8 (CI for mean with z and with Student's t, margin of error).
- Statistical Thinking for the 21st Century — Russell Poldrack · CC-BY-NC. Chapter 9 (frequentist vs. Bayesian interpretation of CI).