In the previous lesson we estimated the average monthly spend of Club Nova members (€126.40, with a standard error of about €5) and learned that a point estimate, on its own, is an incomplete answer. In this lesson we complete it: we will build confidence intervals, ranges of values that accompany the estimate with a measurable guarantee of reliability. It is probably the most widely used — and most widely misread — statistical tool in business reports, so we will pay special attention to what "with 95% confidence" exactly means. Along the way, we will settle a debt outstanding since Module 1: giving the management committee a rigorous answer about the 8.1 satisfaction score.
Contents
- The idea: from point estimate to range
- What "95% confidence" means (and what it does not)
- CI for the mean with σ known: the z formula
- CI for the mean with σ unknown: the t formula
- CI for a proportion
- The answer for the committee: satisfaction and card payment
- What makes an interval wide or narrow: the margin of error
- CI for the difference of two means or two proportions
The idea: from point estimate to range
The reasoning flows straight out of the central limit theorem. We know the sample mean is distributed (approximately) as a normal centered at \( \mu \) with deviation \( \sigma/\sqrt{n} \). And by the 68-95-99.7 rule from Module 4, 95% of sample means fall within 1.96 standard errors of \( \mu \).
Now the telescope turn: if \( \bar{x} \) is within 1.96 standard errors of \( \mu \) 95% of the time, then the interval \( \bar{x} \pm 1.96 \cdot SE \) captures \( \mu \) 95% of the time. That is all the magic there is:
\[ \text{CI} = \text{point estimate} \pm (\text{critical value}) \times (\text{standard error}) \]
The right half of the formula, \( (\text{critical value}) \times (\text{standard error}) \), has a name of its own: the margin of error. It is the "±" you see in election polls.
You already know the normal's critical values from Module 4:
| Confidence level | Area in each tail | Critical value \( z_{\alpha/2} \) |
|---|---|---|
| 90% | 0.05 | 1.645 |
| 95% | 0.025 | 1.960 |
| 99% | 0.005 | 2.576 |
What "95% confidence" means (and what it does not)
This is where most reports slip up, so let us go slowly.
Correct interpretation: confidence is a property of the method, not of the particular interval. If we repeated the sampling many times and built an interval from each sample, approximately 95% of those intervals would contain the true value of \( \mu \). Our particular interval is one of that collection: it either contains \( \mu \) or it does not (we will never know), but it comes from a factory that gets it right 95% of the time.
Incorrect interpretations (and frequent ones):
| Claim | Correct? | Why |
|---|---|---|
| "The method used captures the parameter in 95% of possible samples" | Yes | That is the definition |
| "There is a 95% probability that μ is in [116.5; 136.3]" | No (subtle) | μ is not random: it is either in there or it is not. What was random was the interval, before the sample was drawn |
| "95% of members spend between €116.5 and €136.3" | Emphatically no | The CI speaks about the mean, not about individuals; the individual range is far wider (remember s = €38.50) |
| "If I repeat the sample, 95% of the new means will fall in this interval" | No | It confuses the interval with the sampling distribution; the actual percentage would be lower |
The confusion in the third row is the most dangerous one in business: a narrow CI does not mean customers are homogeneous, only that we have measured the average well.
A useful analogy: pitching horseshoes at a stake. The stake (\( \mu \)) is fixed; what varies on each throw is the horseshoe (the interval). A "95% player" rings the stake in 95 out of every 100 throws. After one particular throw, the horseshoe either rings the stake or it does not — but you trust the player.
CI for the mean with σ known: the z formula
When (rarely) we know the population standard deviation, the interval at confidence level \( 1-\alpha \) is:
\[ \bar{x} \pm z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}} \]
NovaMarket example. The Valencia-Ruzafa store reopened after a refurbishment and Marta wants to estimate its new average daily sales. From the chain's history it is accepted that daily variability is still \( \sigma = \text{€}6{,}200 \) (the same as in the N(43,983; 6,200) of Module 4). Over the first \( n = 36 \) days after the refurbishment, average sales were \( \bar{x} = \text{€}45{,}750 \).
- Standard error: \( 6{,}200/\sqrt{36} = 6{,}200/6 = \text{€}1{,}033.33 \).
- Margin of error at 95%: \( 1.96 \times 1{,}033.33 = \text{€}2{,}025.3 \).
- Interval: \( 45{,}750 \pm 2{,}025 \Rightarrow [43{,}725 ; ; 47{,}775] \) euros.
Business reading: post-refurbishment average daily sales are, with 95% confidence, between €43,725 and €47,775. The interval almost excludes the chain's historical mean (€43,983, hugging the lower edge), which suggests an improvement — although to claim it formally we will need the hypothesis test of the next lesson.
CI for the mean with σ unknown: the t formula
The realistic case: \( \sigma \) is estimated with \( s \), and the critical value comes from the t table with \( n-1 \) degrees of freedom (previous lesson):
\[ \bar{x} \pm t_{\alpha/2,,n-1} \cdot \frac{s}{\sqrt{n}} \]
Example 1: Club Nova spend. With \( n = 60 \), \( \bar{x} = \text{€}126.40 \), \( s = \text{€}38.50 \):
- Standard error: \( 38.50/\sqrt{60} \approx \text{€}4.97 \).
- Critical value: row df = 59, column 0.025 → \( t = 2.001 \).
- Margin of error: \( 2.001 \times 4.97 \approx \text{€}9.94 \).
- 95% interval: \( 126.40 \pm 9.94 \Rightarrow [116.46 ; ; 136.34] \) euros.
Report for Marta: "average monthly spend per member is between €116 and €136, with 95% confidence". Note that with df = 59 the t value (2.001) barely differs from the z (1.96): with large samples the two formulas nearly coincide.
Example 2: where the t makes itself felt — the Cuenca pilot. Before commissioning the big study, the team ran a pilot with only \( n = 12 \) members from Cuenca: \( \bar{x} = \text{€}118.30 \), \( s = \text{€}41.20 \).
- Standard error: \( 41.20/\sqrt{12} = 41.20/3.464 \approx \text{€}11.89 \).
- Critical value: \( t_{0.025,,11} = 2.201 \).
- Margin of error: \( 2.201 \times 11.89 \approx \text{€}26.17 \).
- Interval: \( 118.30 \pm 26.17 \Rightarrow [92.13 ; ; 144.47] \) euros.
A range more than €52 wide: practically useless for decision-making. It is the perfect illustration of why tiny pilots "don't support conclusions" — and of why the sample-size calculation we will see in the lesson Errors, Power and Sample Size exists.
CI for a proportion
For proportions, with large samples (the Module 4 rule: at least 10 successes and 10 failures), the CLT lets us use the normal:
\[ \hat{p} \pm z_{\alpha/2} \cdot \sqrt{\frac{\hat{p}(1-\hat{p})}{n}} \]
Example: active Club Nova members. With \( \hat{p} = 0.64 \) and \( n = 150 \) (SE = 0.0392, computed in the previous lesson):
\[ 0.64 \pm 1.96 \times 0.0392 = 0.64 \pm 0.077 \Rightarrow [0.563 ; ; 0.717] \]
Between 56% and 72% of the 380,000 members are active, at 95% confidence. Notice how wide it is: with proportions, \( n = 150 \) buys little precision.
The answer for the committee: satisfaction and card payment
The moment has come to close the question that has been open since Module 1. The committee saw the mean satisfaction score of 8.1 (640 responses) and asked: "is that 8.1 reliable, or would a different sample produce something else?". We now have everything we need:
Mean satisfaction. \( \bar{x} = 8.1 \), \( s = 1.6 \), \( n = 640 \), SE ≈ 0.063. With \( n \) this large, t and z coincide (1.96):
\[ 8.1 \pm 1.96 \times 0.063 = 8.1 \pm 0.13 \Rightarrow [7.97 ; ; 8.23] \]
The famous "swings ±0.13 at 95%" from Module 4, now in its definitive form. Sentence for the committee: "with 95% confidence, our customers' true mean satisfaction is between 7.97 and 8.23; the figure is solid". And an immediate practical implication: if next year's survey comes out at 8.2, there will be no reason to celebrate — it sits within the natural swing of sampling.
Card payment. \( \hat{p} = 0.61 \), \( n = 200 \), SE = 0.0345:
\[ 0.61 \pm 1.96 \times 0.0345 = 0.61 \pm 0.068 \Rightarrow [0.542 ; ; 0.678] \]
Between 54.2% and 67.8%. A markedly wider range than the satisfaction one: 200 receipts give much less precision than 640 survey responses — and proportions are, in general, expensive to estimate.
What makes an interval wide or narrow: the margin of error
The margin of error \( E = z_{\alpha/2} \cdot \sigma/\sqrt{n} \) (or its t/proportion version) depends on three levers:
| Factor | If it increases… | The interval… | Intuition |
|---|---|---|---|
| Sample size \( n \) | ↑ | Narrows (with \( \sqrt{n} \)) | More information, less uncertainty; ×4 the sample = half the width |
| Confidence level | ↑ (95% → 99%) | Widens | More guarantee demands more margin: certainty is paid for in precision |
| Dispersion (\( \sigma \) or \( s \); \( \hat{p} \) near 0.5) | ↑ | Widens | Heterogeneous populations are harder to summarize |
On the second row, compare it in the spend case: at 99% (\( t_{0.005,,59} \approx 2.662 \)) the interval would be \( 126.40 \pm 13.23 = [113.17; 139.63] \), three euros wider on each side than the 95% one. There is no useful "100% confidence" interval: it would be \( (-\infty, +\infty) \).
The only lever the analyst truly controls is \( n \). Solving for the \( n \) needed to hit a target margin of error is exactly what we will do in lesson 05-04.
CI for the difference of two means or two proportions
Many decisions are not about one value but about a comparison: store vs online? Madrid vs Cuenca? The recipe is the same — estimate ± critical value × standard error — swapping two pieces: the estimate is the difference, and the standard error combines the two samples (variances of independent samples add, as we saw in Module 3):
\[ (\bar{x}_1 - \bar{x}2) \pm z{\alpha/2} \cdot \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}} \qquad\quad (\hat{p}_1 - \hat{p}2) \pm z{\alpha/2} \cdot \sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_2}} \]
(With large samples we use z; with small samples the t is used, with degrees of freedom we leave for more advanced courses.)
Example: store vs online satisfaction. Breaking down the 640 survey responses: in-store customers, \( n_1 = 450 \), \( \bar{x}_1 = 8.3 \), \( s_1 = 1.5 \); online customers, \( n_2 = 190 \), \( \bar{x}_2 = 7.6 \), \( s_2 = 1.9 \).
- Estimated difference: \( 8.3 - 7.6 = 0.7 \) points.
- Standard error: \( \sqrt{\dfrac{1.5^2}{450} + \dfrac{1.9^2}{190}} = \sqrt{0.0050 + 0.0190} = \sqrt{0.0240} \approx 0.155 \).
- 95% CI: \( 0.7 \pm 1.96 \times 0.155 = 0.7 \pm 0.30 \Rightarrow [0.40 ; ; 1.00] \).
The key to reading it: does it contain zero? Here it does not — the whole interval is positive. With 95% confidence, in-store satisfaction exceeds online satisfaction by between 0.4 and 1 point: the gap is real, not a sampling mirage. If the interval had been, say, [−0.1; 0.5], we could not rule out that the two means were equal. This zero criterion is the direct bridge to the next lesson.
Quick example with proportions. Card payment at Madrid-Centro (\( \hat{p}_1 = 0.68 \), \( n_1 = 200 \)) versus Cuenca (\( \hat{p}_2 = 0.49 \), \( n_2 = 200 \)): difference 0.19; SE \( = \sqrt{0.68 \times 0.32/200 + 0.49 \times 0.51/200} = \sqrt{0.002338} \approx 0.048 \); 95% CI: \( 0.19 \pm 0.095 \Rightarrow [0.095; 0.285] \). It does not contain zero: card payment is clearly higher at Madrid-Centro than in Cuenca (by between 9.5 and 28.5 points).
Common Mistakes and Tips
- "There is a 95% probability that μ is in the interval". Strictly, the 95% probability belongs to the method, not to the interval once computed. In a report, say "with 95% confidence" and, if asked to explain, use the horseshoe analogy.
- Confusing the CI of the mean with the range of individuals. [116; 136] euros bounds the average spend, not each member's spend: most members spend outside that range. They are different questions with different widths.
- Using z with small samples and σ unknown. With the Cuenca pilot (n = 12), using 1.96 instead of 2.201 would artificially narrow the interval by 11%: fictitious precision.
- Ignoring the validity rule for proportions. The normal CI for \( \hat{p} \) requires roughly at least 10 successes and 10 failures. With 4 returns out of 50 orders, do not use it.
- Comparing two groups by checking whether their individual CIs overlap. It is an overly conservative criterion: two CIs can overlap slightly and the difference still be significant. The correct approach is to build the CI of the difference and check whether it contains zero.
- Forgetting that the CI only covers sampling error. If the sample suffers selection bias (Module 1), the interval will be badly centered no matter how narrow it is. Statistical confidence does not fix badly collected data.
Exercises
Exercise 1. Build the 99% CI for the proportion of receipts paid by card (\( \hat{p} = 0.61 \), \( n = 200 \), SE = 0.0345) and compare it with the 95% one computed in the lesson. What have you gained and what have you lost by raising the confidence level?
Exercise 2. In the satisfaction survey, the 190 online customers gave \( \bar{x} = 7.6 \) with \( s = 1.9 \). Build the 95% CI for mean online satisfaction (use z, since n is large) and interpret the result in one sentence for the committee. Does it contain the corporate target of 8?
Exercise 3. The head of logistics summarizes an analysis like this: "the 95% CI for the mean delivery time is [40.2; 43.8] hours, so 95% of orders arrive in under 44 hours". Point out the error and rewrite the conclusion correctly.
Solutions
Solution 1. Margin: \( 2.576 \times 0.0345 \approx 0.089 \). 99% CI: \( [0.521; 0.699] \), versus \( [0.542; 0.678] \) at 95%. You gain guarantee (the method will fail only 1 time in 100) in exchange for 4.2 percentage points more total width. Common mistake: using 2.326 (which is the one-tailed critical value at 1%, the z of P99); for a 99% CI the area is split into two tails of 0.005 each and the critical value is 2.576.
Solution 2. SE \( = 1.9/\sqrt{190} = 1.9/13.78 \approx 0.138 \). CI: \( 7.6 \pm 1.96 \times 0.138 = 7.6 \pm 0.27 \Rightarrow [7.33; 7.87] \). Sentence: "with 95% confidence, the online channel's mean satisfaction is between 7.3 and 7.9 points: it falls short of the target of 8, even at its upper end". It does not contain the 8, which foreshadows a real problem in the online channel. Common mistake: using the overall SE of 0.063 (which corresponds to all 640 responses together) instead of the SE of the online subgroup.
Solution 3. The error is interpreting the CI of the mean as coverage of individual orders (row 3 of our misinterpretations table). Individual delivery times are far more dispersed than the sample mean. Correct: "with 95% confidence, the mean delivery time is between 40.2 and 43.8 hours". To talk about the percentage of individual orders under a threshold, you use the distribution of the variable (as we did with F(48) = 0.899 in Module 4), not the CI of the mean.
Conclusion
We now know how to turn a point estimate into an honest range: estimate ± critical value × standard error, with z when \( \sigma \) is known or the sample is large, with t when it is estimated with \( s \), and with its versions for proportions and for differences between groups. We know what 95% confidence truly means, which three levers govern the width of the interval, and we have finally given the committee its answer: mean satisfaction is in [7.97; 8.23] and card payment in [54.2%; 67.8%].
The interval for the store vs online difference ([0.40; 1.00], not containing zero) has also left us with an uncomfortable conclusion: the online channel is doing worse. But how is that kind of claim formalized? How do you decide, with explicit rules and a controlled risk of error, whether "there is an effect" or "it is sampling noise"? That is the territory of Hypothesis Testing, statistics' decision-making machinery.
Statistics Course
Module 1: Introduction to Statistics
Module 2: Describing Data
- Measures of Central Tendency
- Measures of Dispersion
- Measures of Position and Outliers
- Graphical Representation of Data
Module 3: Probability
Module 4: Probability Distributions
- The Binomial Distribution
- The Normal Distribution
- Other Important Distributions
- The Central Limit Theorem
Module 5: Statistical Inference
Module 6: Data Analysis
- Correlation Analysis
- Regression Analysis
- Analysis of Variance (ANOVA)
- Categorical Data Analysis: Chi-Square
