Confidence interval Created 2026-09-28 Updated 2026-10-14
A confidence interval is a random interval constructed from a statistical sample to cover a fixed unknown statistical parameter with a prescribed coverage probability. For a scalar target , a procedure with nominal confidence satisfies
The subscript records which probability distribution generates the repeated samples. The endpoints are statistics, so they vary from sample to sample; the target is fixed. Equality gives exact nominal coverage probability, while the inequality also permits conservative procedures. For a general estimand , replace the target inside the interval by .
A realized confidence interval communicates the precision of an estimate in the target's own units. Reporting alone conceals the difference between an estimate with standard error and one with standard error . A narrow confidence interval indicates greater precision for the stated statistical model, rather than a guarantee that its assumptions describe the experiment correctly.
Once is observed, either contains the fixed target or does not. The 95% statement concerns the random procedure , not a posterior probability of 0.95 that this particular interval contains . A credible interval instead assigns specified posterior probability to a region under Bayesian inference. These interpretations can differ even when the numerical endpoints agree. The repeated-sampling interpretation is explained in NIST's confidence-limits teaching reference.
Jerzy Neyman's 1937 paper formulates the fixed-target, random-endpoint construction in Section II, especially equation (20) on page 348. Its confidence coefficient must hold across the allowed statistical parameters, rather than only at the value suggested by one sample. See Neyman, Outline of a Theory of Statistical Estimation Based on the Classical Theory of Probability and the original paper scan.
Coverage probability 2026-10-14
The coverage probability is the repeated-sampling probability that a random confidence interval contains the fixed true statistical parameter. A finite-sample level- procedure has coverage probability at least at every admissible statistical parameter; exact nominal coverage means equality. An asymptotically calibrated procedure approaches the nominal value as sample size grows, under its stated assumptions. Higher-order Edgeworth expansions can quantify the discrepancy from nominal coverage probability when their regularity conditions hold.
Observed coverage in finitely many repetitions is itself random. For independent repetitions of the exact normal mean confidence interval with known variance, the count of covering confidence intervals has binomial distribution . At , its expectation is , but
Consequently, the 39 successes in the figure are compatible with exact 95% coverage probability. The guarantee follows from the pivotal quantity's probability distribution; the finite observed fraction is an illustration. Also distinguish a confidence interval for a fixed mean from a prediction interval for a future observation: the latter must accommodate the new observation's variation as well as estimation uncertainty.
Credible interval Created 2026-09-28 Updated 2026-10-14
A credible interval is an interval containing a prescribed amount of posterior probability for an unknown scalar statistical parameter . For a continuous posterior distribution with posterior density , its endpoints satisfy
The conditioning includes the chosen statistical model and prior distribution. For a discrete posterior distribution, exact equality may be impossible because of its probability masses; an interval can instead be required to contain at least the requested posterior probability. An interval compresses the full posterior distribution into a range whose uncertainty can be communicated in the parameter's own units. See MIT 18.05, Class 16: probability intervals.
For the eight-head, two-tail example in Bayesian statistics, the posterior density is on . Its cumulative distribution function, obtained by integration of this polynomial, is
Solving and by the bisection method gives
These are numerical approximations to the exact quantiles defined by those equations; the endpoints were computed from the cumulative distribution function, rather than read off a plot. The resulting equal-tailed credible interval leaves 2.5% posterior probability on each side. Its shaded area is 95% of the total area under the posterior density.
Figure 1.
Two different 95 percent credible intervals for the same Beta(10,4) posterior
. Details.
Credible intervals are not unique. The one-sided credible interval also has 95% posterior probability, but leaves all 5% outside it on the right. A highest density region instead selects points above a density threshold; it need not be an equal-tailed credible interval, and when the posterior density has separated peaks it need not be one interval at all. Thus a reported credible interval should specify its construction.
A 95% credible interval makes a statement about the statistical parameter conditional on these observed data and the Bayesian model. A 95% confidence interval instead refers to the coverage probability of a procedure under repeated sampling at a fixed parameter value. These are different conditioning statements: 95% posterior probability does not by itself imply 95% coverage probability for every fixed parameter. The confidence interval article develops that sampling interpretation.
For an exponential distribution with mean , the maximum-likelihood estimator is and converges to a standard normal distribution. Inverting the event that this pivot lies between and gives the displayed confidence interval, provided . Its two-sided coverage probability has error , because the first Edgeworth expansion term is even and cancels between the two tails.
Suppose are independent and identically distributed with normal distribution , where the mean is unknown and the standard deviation is known. The sample mean has normal distribution and standard error . With the standard normal quantile at , the displayed confidence interval has exact coverage probability for every and every positive integer . No central limit theorem approximation is needed.
Take , and nominal confidence 95%. The standard error is , and . Therefore
Rounded for reporting, this is . If , the realized confidence interval is approximately . Exact 95% calibration refers to the unrounded standard normal quantile; using literally gives coverage probability , almost but not exactly 0.95.
The confidence interval's width scales as : increasing sample size from 16 to 64 halves its half-width to . If is unknown, merely substituting the square root of a sample variance loses the displayed exact calibration; for the same normal distribution model, use a Student t confidence interval.
The figure holds the true mean at and independently generates 40 samples of 16 observations from the same normal distribution. NumPy's PCG64 generator with seed 42 gives 39 covering confidence intervals and one miss, at sample 32: observed coverage is . Every bar uses the unrounded standard normal quantile. This finite collection illustrates the moving endpoints; it does not establish the analytic coverage probability or require exactly two misses.
Figure 1.
Forty normal-mean confidence intervals and their exact 95% coverage event
. Details.
The beauty of the construction is that a familiar standard normal distribution calibrates every possible unknown mean at once. For a short proof, the pivotal quantity
has a probability distribution independent of . The event has probability ; rearranging it gives . The right panel shows the equivalent event when .
Statistical inference Created 2026-09-24 Updated 2026-10-13
Statistical inference uses observed data and a statistical model to learn about unknown features of the process that generated them. In a parametric statistical model, write : the probability distribution depends on an unknown statistical parameter . An estimand specifies the target, such as a mean or a difference of means. A statistic is a function of the observations; an estimator is a statistic used to estimate the target. Uppercase denotes the random data before observation, while lowercase denotes their realized values.
Three questions lead to different outputs. Statistical estimation asks which target value the observations suggest. A confidence interval asks for a range produced by a procedure with calibrated coverage probability. A hypothesis test asks whether the observations depart sufficiently from a specified null hypothesis to enter its rejection region. These outputs complement one another: an estimated effect size describes magnitude, while a standard error describes the sampling distribution of an estimator. A p-value describes a tail probability under the null hypothesis.
The appeal of statistical inference is that it turns variable observations into reproducible uncertainty statements. In the normal mean confidence interval with known variance below, a sample mean of has standard error : both the estimated shift and its precision matter. The calibration depends on the statistical model, including independence and the specified probability distribution. Increasing sample size improves precision under those assumptions; it does not repair a systematically misleading sampling procedure. Bayesian inference provides another framework, using a prior distribution and a likelihood function to obtain a posterior distribution.