The Maths You Actually NeedLesson 53 of 76

Module 6 · Estimation: from a sample to a number you can trust

What a 95 per cent interval promises, and where the textbook one breaks

In this lesson

  • 10 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 5 of 9 in this chapter

This chapter’s goalCompute a standard error and a confidence interval for an accuracy figure by hand, say from the sample size and base rate whether the textbook interval can be trusted, bound a failure rate from a run with zero failures, derive an L2 or L1 penalty from a stated prior on the weights, and predict how much the best of k noisy candidates will fall back when re-measured.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available
Forty-nine right out of fifty, two intervalsTextbook: the estimate plus or minus 1.96 SE0.941 to 1.019, an upper bound above 1Fifty out of fifty gives SE zero and theinterval 1.00 to 1.00Symmetric, because the recipe assumes it isReal coverage at p = 0.98 and n = 50 is 63.5per centWilson: solve for the plausible true rates0.895 to 0.997Fifty out of fifty gives 0.929 to 1.000Asymmetric, and always inside 0 to 1Coverage stays near the 95 it promisesThe textbook width is computed from the estimate, and near 0 or 1 the estimate is a poor stand-in forthe truth, so the width comes out wrong. Use Wilson whenever np or n times one minus p is under aboutten, which for a rare failure rate is nearly always.
The textbook width is computed from the estimate, and near 0 or 1 the estimate is a poor stand-in for the truth, so the width comes out wrong. Use Wilson whenever np or n times one minus p is under about ten, which for a rare failure rate is nearly always.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 8Free · no account needed
Lesson steps

The promise is about the procedure

A 95 per cent confidence interval is a recipe with a guarantee: if you drew sample after sample and ran the recipe each time, 95 per cent of the intervals it produced would contain the true value. The guarantee is about the long run of the procedure. It is not a statement that the truth has a 95 per cent chance of being inside the one interval in front of you; that reading belongs to the Bayesian interval two lessons on, and it needs a prior to earn it.

You can check the promise directly.

Python
import numpy as np
rng = np.random.default_rng(1)
true_p, n, hits = 0.7, 200, 0
for _ in range(10_000):
    k = rng.binomial(n, true_p)
    p = k / n
    se = np.sqrt(p * (1 - p) / n)
    hits += (p - 1.96 * se) <= true_p <= (p + 1.96 * se)
print(hits / 10_000)            # about 0.95

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Stuck on something?Ask Funke, your AI tutor

How to cite: Addaly (2026) ‘What a 95 per cent interval promises, and where the textbook one breaks’, in The Maths You Actually Need. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/maths-you-need/confidence-intervals-mechanics (Accessed: 29 November 2026).