Confidence interval
A confidence interval is a range of values, computed from a sample, that is built to contain an unknown quantity such as a population mean, at a stated confidence level. It reports an estimate together with its sampling uncertainty, instead of a single figure.
What it is
A confidence interval is a range of values for an unknown population quantity, called a parameter, calculated from a sample. The parameter is usually a mean or a proportion. The interval is attached to a confidence level, a percentage chosen before the calculation.
The National Institute of Standards and Technology (NIST) describes confidence intervals as built at a chosen confidence level and as two-sided, with a lower and an upper bound, or one-sided, with a single bound.
The confidence level describes the procedure. If the same sampling and calculation were repeated many times, the stated share of the intervals produced would contain the true value.
For the mean of a sample, a common form is:
mean ± t × s / √n
Here mean is the sample mean, s is the sample standard deviation, n is the sample size, and t is a multiplier taken from the t distribution for the chosen level. The part s / √n is the standard error. NIST notes that intervals are wider when the standard deviation is estimated from limited data.
Three things make an interval wider: a higher confidence level, more spread in the data, and a smaller sample.
Why it matters
A sample gives an estimate, and a second sample would give a different one. A bare figure hides how far it could move.
The interval shows the precision of the estimate, so that a reader can judge whether a difference or a target is within the margin of sampling error. It is a standard way to report results from surveys, audits, model back-tests and experiments.
Worked example
Illustrative numbers. A sample of 100 invoices has an average value of 200, with a sample standard deviation of 50.
- The standard error is 50 divided by the square root of 100, which is 5.
- For a 95 percent level the multiplier is about 2.
- The margin is 2 times 5, which is 10.
- The interval runs from 190 to 210.
With a sample of 400 invoices and the same spread, the standard error falls to 2.5 and the interval narrows to about 195 to 205. Quadrupling the sample halves the width.
How to read it
A narrow interval means a precise estimate, and a wide one means the data say little. The interval refers to the unknown parameter and not to individual observations: most single invoices in the example lie outside the range 190 to 210.
NIST links intervals to testing. A two-sided interval at a given level contains the tested value exactly when the corresponding test does not reject it at the matching significance level.
Assumptions
- The sample is random or otherwise representative of the population.
- The formula above relies on an approximately normal sampling distribution of the mean, which a large sample often supports.
- Observations are independent of one another.
Who uses it
- Data analysts and statisticians attach intervals to averages and rates in reports.
- Data scientists report intervals for model metrics measured on a test sample.
- Model validators and credit risk model developers use intervals around estimated rates and back-test results.
- Performance analysts report the uncertainty of an estimated average return.
- Actuarial analysts quantify the precision of estimated frequencies and averages.
- Market research analysts report survey results with a margin of error.
Common confusions
- The confidence level is not the probability that the true value lies in one computed interval. It describes how often the method captures the true value.
- The interval is not a range for individual observations. A tolerance interval covers a stated share of the population, a different object that NIST treats separately.
- A higher confidence level gives a wider interval. It does not make the estimate more accurate.
- A larger sample narrows the interval only if the sample is representative. Bias is not reduced by size.