Confidence Intervals
Point estimation answers "what is the single best value of ?"; interval estimation answers the more honest "what range of is the data actually consistent with?". A confidence interval is the frequentist answer: a data-dependent interval manufactured so that, across hypothetical repetitions of the whole experiment, it brackets the true fixed a stated fraction of the time. That fraction — the coverage probability — is the defining guarantee, and also the single most misread number in applied statistics. The randomness lives in the endpoints, not in . Before the data arrive, are random variables and the coverage statement is a probability over data. After you observe and print a number, the realised interval either contains the fixed or it does not — the "" was a property of the rule, spent the moment the dice were cast. This is exactly where the frequentist interval parts company from the Bayesian credible interval, which conditions on the data through Bayes' theorem. The engine that builds these intervals is the pivot: a function of data and parameter whose sampling distribution does not depend on at all. You bracket between two fixed quantiles carrying probability and algebraically invert to wrap in an interval. For a Gaussian sample the standardised mean and the Student- statistic are exact pivots; for sums the central limit theorem supplies asymptotic ones; and when none exists you invert a family of hypothesis tests instead. One object, the pivot; one recurring caution, the meaning of coverage.
- A confidence interval is a random interval built from the data so that, before the data are seen, it contains the true parameter with probability — the coverage.
- Coverage is a property of the procedure, not of the number you printed: is a fixed constant and the endpoints are random. "There is a probability lies in this particular interval" is the canonical error.
- The workhorse recipe inverts a pivotal quantity — a function of data and whose distribution is free of — such as or .
- For a Gaussian mean with known variance the interval is , with giving the famous at .
- Exact intervals need an exact pivot; otherwise use asymptotics (Wald, likelihood-ratio) or exact-but-conservative constructions (Clopper–Pearson), trading exact coverage against interval length.
- Intervals are dual to tests: the interval is exactly the set of a level- test would not reject, so interval-building and testing share one machinery.
- Key idea: construct a pivotal quantity whose sampling distribution is free of , bracket it between known quantiles with total probability , then algebraically invert to solve for — the resulting random interval has coverage by construction.
Where this lives today
The confidence interval is the standard grammar of experimental uncertainty. Every measured constant in the CODATA tables is quoted with an interval whose "" is a coverage statement, and consistency with theory is judged by whether the prediction falls inside it. In particle physics, because event counts are Poisson, experiments use exact Garwood intervals or invert the profile likelihood ratio — the of equation (6) — with the Feldman–Cousins ordering adopted by the Particle Data Group to avoid the empty intervals naive recipes produce near a physical boundary; a zero-count search reports a one-sided upper limit of events. In cosmology the confidence ellipsoid reports correlated constraints on and from the microwave background, with the caveat that the two-parameter contour uses , not . And the running debate between frequentist and Bayesian intervals — sharpest where data are scarce and a boundary looms — is live in every field that measures something rare.
The physical picture
Imagine running the experiment not once but a thousand times, each run drawing fresh data and applying the same interval rule. You get a thousand intervals, all slightly different, scattered around the one fixed true value. A rule is one for which of them straddle the truth. The single interval you computed is just one draw — it hit or missed, and nothing in the data tells you which. The first figure makes the ensemble concrete.
The second view is the machine that produces one such interval. The pivot hides the unknown inside itself, yet carries a fixed law regardless of what is. Because its distribution is anchored, we pin its quantiles once — of its mass lies between — and "unfold" the bracket into a statement about . Width and confidence trade off through that quantile, and there is no free lunch — a guaranteed- interval is .
A third mental model comes free: a confidence interval is the set of hypothesised values the data could not reject at level — the test–interval duality that makes intervals and -values two faces of one calculation.
The core equations
The defining property is coverage. It is a probability taken over the data , holding for every possible value of the fixed parameter , which is what makes it a guarantee rather than a description of one dataset.
where: — fixed unknown parameter; — random data vector; — random endpoints (statistics of ); — confidence level, the nominal coverage. The construction tool is the pivot. Its defining feature is that although appears inside it, its probability law is completely free of , so its quantiles are known numbers.
where: — a function of both data and parameter, monotone in so the bracket can be inverted. Bracketing with and solving for delivers the interval. For a Gaussian sample with known variance the standardised mean is an exact pivot, and inverting it gives the archetypal interval every physicist has met as "".
where: — sample mean; — known population standard deviation; — sample size; — standard-normal upper quantile, at . The half-width shrinks as — quadruple the data to halve it. When is unknown and must be estimated by the sample standard deviation , the extra uncertainty inflates the pivot's tails from Gaussian to Student-, so the multiplier grows and the interval widens.
where: — Bessel-corrected sample standard deviation; — Student- quantile with degrees of freedom, e.g. , decreasing to as . When no exact pivot exists, the maximum-likelihood estimate is asymptotically Gaussian; standardising it by its estimated standard error gives an approximate pivot — the Wald interval.
where: — maximum-likelihood estimate; — Fisher information; the variance is read off the inverse information at the estimate. Valid only for large , and poor near parameter boundaries. A better large-sample interval inverts the likelihood-ratio statistic, whose null distribution is by Wilks' theorem; it need not be symmetric and respects parameter boundaries.
where: — likelihood function; — MLE maximising ; — chi-square quantile with degree of freedom, equal to at , whose square root recovers the Wald width. For discrete data no interval can hit coverage exactly; the Clopper–Pearson construction inverts the binomial tail probabilities exactly, at the price of being conservative.
where: — observed successes in trials; — quantile function of the Beta distribution, which the Beta–Binomial identity ties to the binomial tail sums. Actual coverage is .
The goal is to build the exact interval for the mean of a Gaussian sample with known variance, by exhibiting an exact pivot, bracketing it between fixed quantiles, and inverting the bracket algebraically so the probability statement carries over verbatim from pivot to parameter. We take independent and identically distributed as with known, and check that every step is an equivalence, so the coverage is exact for any sample size, not merely asymptotic.
Step 1. The sample mean of independent Gaussians is again Gaussian, , with the same mean and variance shrunk by . Why: a sum of independent normals is normal with added variances, and dividing by scales the variance by , giving — this is where the improvement in precision is born.
Step 2. Standardise to form the pivot . Why: subtracting the mean and dividing by the standard deviation removes every trace of and from the distribution, so carries the unknown inside but has a completely known law — the defining property of a pivot.
Step 3. Bracket the pivot between symmetric quantiles: . Why: the standard normal is symmetric about zero, so putting probability in each tail leaves exactly in the centre, and the quantile is a fixed tabulated number, at .
Step 4. Invert the double inequality to isolate : from one gets . Why: each manipulation — multiplying by , subtracting , negating and flipping the inequality — is an exact equivalence, so the probability transfers unchanged to the event that lies in the interval. *Note: (rounded to ) and ; the half-width scales as .*
Go deeper · Derivation B · 1 minThe Student-t interval when the variance is unknown
The goal is to repair the -interval for the realistic case where is unknown and must be estimated from the same data, showing that replacing by the sample turns the exact Gaussian pivot into an exact Student- pivot — heavier-tailed, and so producing a legitimately wider interval, the price for not knowing the spread. We keep the Gaussian sampling assumption, which is what makes the construction exact rather than asymptotic.
Step 1. Two independent building blocks exist for a Gaussian sample: and , and crucially and are independent. Why: for normal data alone the sample mean and sample variance are statistically independent (a theorem of Fisher and Cochran), and the scaled variance follows a chi-square with degrees of freedom because one degree is spent estimating the mean.
Step 2. Form the ratio , which by definition is distributed as Student- with degrees of freedom. Why: the unknown cancels between the numerator's and the denominator's , leaving a quantity that still hides but whose law is the parameter-free — again a genuine pivot.
Step 3. Bracket and invert exactly as before: gives . Why: the distribution is symmetric, so the same two-tailed bracket applies, but its heavier tails force , widening the interval to honestly absorb the uncertainty in . *Note: and , both exceeding and decreasing toward it as , where and .*
Go deeper · Derivation C · 1 minConfidence intervals as inverted hypothesis tests
The goal is to prove the duality that unifies this whole subject: a confidence set is precisely the collection of parameter values a level- test would fail to reject, so that whenever no clean pivot exists one can still manufacture a valid interval by inverting a family of tests. We attach to each candidate the acceptance region of a level- test of , collect the accepted values, and show the resulting random set has coverage .
Step 1. A level- test of accepts the true null with the complementary probability, . Why: "level " means the test rejects a true null at most a fraction of the time, so it accepts a true null with probability — this is the single probabilistic input the whole argument needs.
Step 2. Define the inverted set , so that membership is equivalent to acceptance: . Why: the definition simply relabels "the data accept " as " belongs to the set", converting a family of yes/no test decisions into one region of parameter space.
Step 3. Evaluate the coverage at the true : . Why: substituting the equivalence from Step 2 at the true value and using Step 1 shows the inverted set covers the truth with probability — hence is a valid confidence set, and inverting the -test reproduces exactly the -interval of the first derivation. *As a consistency check: inverting the two-sided -test of returns exactly , confirming that the duality reproduces the -interval of the first derivation.*
Limiting cases
How the standard Gaussian-mean interval specialises and degrades as the assumptions are varied:
| Case | Result | Meaning |
|---|---|---|
| Known variance, exact | Exact for any when the data are Gaussian and is known; . | |
| Unknown variance, small | Use Student-; e.g. , wider than the -interval to pay for estimating . | |
| Large (CLT regime) | The -interval collapses onto the -interval, and is asymptotically normal even for non-Gaussian data. | |
| Confidence level limits | Demanding certainty sends the half-width to infinity; shrinks it to a useless point. | |
| Discrete data | coverage | No interval hits exactly for all ; Clopper–Pearson over-covers. |
Worked examples
1 · A Gaussian mean with unknown variance (fully worked)
A resistor is measured ten times, giving . The instrument's noise is not separately characterised, so is unknown. Report a confidence interval for the true resistance.
Step 1. Point estimates. The sample mean is . The Bessel-corrected variance is , giving and a standard error of the mean .
Step 2. Pick the multiplier. Because is unknown and is small, use Student- with degrees of freedom: , appreciably larger than the Gaussian — the tax for estimating the spread from only ten points.
Step 3. Assemble the interval. The half-width is , so the interval is .
Step 4. Read it correctly. This does not say ""; it says the rule that produced these endpoints brackets the true resistance of the time across imagined repetitions. Had been known a priori, the -interval would use for a narrower half-width . Result: , i.e. a 95% interval .
2 · A detector efficiency: three intervals for one proportion (fully worked)
A calibration run fires tagged particles at a detector and register. Estimate the detection efficiency at confidence, comparing the Wald, Wilson, and Clopper–Pearson recipes.
Step 1. Point estimate and naive Wald interval. The estimate is , with Wald standard error . The Wald interval spills past , an impossible efficiency, exposing the recipe's failure near the boundary.
Step 2. The Wilson score interval keeps the continuity terms, staying inside : with its centre and half-width give , asymmetric about and leaning toward the interior — exactly what a bounded parameter demands.
Step 3. The Clopper–Pearson interval inverts the binomial tails exactly through Beta quantiles, — the widest of the three, because exact coverage for discrete data forces conservatism ().
Step 4. Choose. Wald is disqualified here (it left the parameter space); Wilson is the pragmatic default for moderate ; Clopper–Pearson is used when a coverage guarantee is mandatory. Had zero been registered (), Wald would collapse to with a false claim, while Clopper–Pearson still gives a sensible upper limit . Result: efficiency near 0.80 with 95% interval [0.49, 0.94] (Wilson); Wald's [0.55, 1.05] is invalid.
Physics of the portrait
Confidence intervals are one of the youngest ideas a physicist uses daily — not distilled from folklore but constructed as a deliberate alternative to the Bayesian inverse probability that had dominated the nineteenth century.
Origins · 1 minJerzy Neyman and how this was discovered
Jerzy Neyman built the confidence interval as an act of philosophical engineering. Trained in Kharkiv and passing through Warsaw and London, he carried one conviction: statistical inference should make guarantees that do not depend on any prior belief about the parameter. In his 1937 paper "Outline of a Theory of Statistical Estimation Based on the Classical Theory of Probability" he defined the confidence interval exactly as we use it — a random interval whose coverage is fixed by construction and holds whatever the true parameter is. The move was radical because it relocated the probability from the parameter, where Bayes had put it, onto the procedure, sidestepping any prior. Neyman was explicit, almost combative, that "the parameter is not a random variable"; the confidence lives in the long-run behaviour of the rule, not in the single answer. With Egon Pearson he had already forged the theory of hypothesis testing whose acceptance regions his intervals invert, so testing and estimation became two faces of one framework. Emigrating to Berkeley in 1938, he built a great statistics department and trained a generation who carried the frequentist interval into physics, genetics, and clinical trials, where it remains the default way to quote an experimental uncertainty.
Going further
Texts. Casella & Berger, Statistical Inference, 2nd ed., Ch. 9 (the definitive treatment of interval estimation and duality) · Cowan, Statistical Data Analysis (Oxford) for the physics conventions on Poisson and likelihood intervals · Stone & Goldbart, Mathematics for Physics (CUP) · Arfken, Weber & Harris, Mathematical Methods for Physicists, 7th ed. · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed. Key numerical anchors: , ; , ; , ; the zero-count Poisson upper limit ; worked-example intervals and Wilson , Clopper–Pearson for . All are standard tabulated or directly computable values.
Prerequisites. Random Variables and Probability Distributions · Cumulative Distribution Functions and Change of Variables · Gaussian (Normal) Distribution · Central Limit Theorem · Expectation, Variance and Moments. Leads to. Conditional Probability and Bayes' Theorem · Multivariate Gaussian Distribution · Poisson Distribution · Binomial and Bernoulli Distributions.
Ask the tutor: Ask me to walk through inverting any pivot or test — from the and intervals to Clopper–Pearson, Feldman–Cousins, or a two-parameter confidence ellipse — and I will build the interval and check its coverage with you step by step.
What is the difference between a confidence interval and a Bayesian credible interval?
They answer different questions. A frequentist confidence interval treats as a fixed constant and makes the endpoints random; its is the long-run fraction of intervals that would cover over repeated experiments. A Bayesian credible interval treats as random, combines a prior with the likelihood through Bayes' theorem, and reports a range holding of the posterior — so "there is a probability is in here" is legitimate for a credible interval and illegitimate for a confidence interval. They often nearly coincide for a Gaussian mean with a flat prior, which is why the distinction is so easily blurred, but they can differ sharply near boundaries or with informative priors.
How do I choose the confidence level, and why not always use 99.99%?
The level trades reliability against resolution, with no free lunch. A higher level widens the interval — going from to multiplies the Gaussian half-width by , and demanding certainty () sends the width to infinity, giving the useless . The right level is a domain convention: (about ) is the default in most sciences, while particle physics reserves () for discovery claims because the look-elsewhere effect and systematics demand extreme stringency. Pick the level before seeing the data.
When should I use the t-interval versus the z-interval?
Use the -interval only when the population standard deviation is genuinely known independently of the data — for instance a well-characterised instrument noise. In almost every real experiment is estimated from the same sample by , and then the correct pivot is Student-, giving . The distinction matters most for small : at the multiplier is rather than , a wider interval. As grows the two converge — by it is , by within a percent of — so for large samples the choice is immaterial and people often quote the value out of habit.
Why do binomial and Poisson intervals not achieve exact coverage?
Because the data are discrete. Coverage is a sum of probabilities over the finitely many outcomes that would land the true parameter inside the interval, and as the true (or rate) slides continuously, that sum jumps in steps each time an outcome crosses an endpoint. No construction can pin a step function to the constant for every parameter value, so one must choose: Clopper–Pearson and Garwood guarantee coverage never falls below but pay with conservatism (often over-covering to –), while approximate intervals like Wilson track on average but dip below it for unlucky values. This is a genuine engineering trade-off, not a defect — the right choice depends on whether under-coverage or width is the greater sin.
What is the confidence ellipsoid and why is its threshold not 1.96²?
For several parameters estimated jointly, the analogue of an interval is a confidence region, and for a multivariate Gaussian estimate it is the ellipsoid , with the covariance matrix and the number of parameters. The threshold is a chi-square quantile with degrees of freedom, growing with : for one parameter at it is , but for two parameters at the same it is . Reading off one-parameter error bars () and calling the resulting box a joint region is a classic mistake — it badly under-covers, because the joint region must be larger to catch both parameters at once.
Does a wider interval mean a worse measurement?
Only at a fixed confidence level. There, a narrower interval is more informative, and the width shrinks as — bought with better instruments (smaller ) or more data (larger ). But a wide interval at can beat a narrow one at , since the narrow one misses the truth half the time, so the honest figure of merit is the pair (level, width) together. The deepest trap is a suspiciously tight interval built on an underestimated or an unmodelled systematic: one that misses the truth is worse than an honest wide one.