A random sample of observations has mean . The sample mean is a sensible estimate of the population mean , but the single number does not say how far from it might be. A confidence interval attaches a range to the estimate, produced by a rule whose behavior over repeated samples can be worked out in advance. This lesson builds such a rule, explains what its confidence level promises and what it does not, and shows how the width of the interval depends on the level and on the sample size.
Key terms
Confidence interval
Definition Let be a parameter of a statistical model. An interval procedure is a rule that turns each possible data set into an interval , whose endpoints and are statistics computed from the data. The procedure gives confidence intervals for at confidence level if, under the model,
for every allowed value of and of any other parameters in the model, with the probability computed over random samples while the parameters stay fixed. Many practical procedures reach this only approximately, and some guarantee at least . The interval computed from the observed data is also called a confidence interval. It is one outcome of the procedure. The simplest example assumes independent observations from with known, and uses
where is the quantile of the standard normal distribution. This is the 95 percent z interval for .
In plain words A confidence interval is an estimate together with a range built by a fixed recipe. Before the data arrive, the endpoints are random, because they depend on which sample is drawn. The parameter is a fixed unknown number. The confidence statement is a statement about the recipe.
Example Take and , so the standard error is . With the observed mean ,
This is the 95 percent confidence interval for from this sample. Another sample would give another center and another interval.
Confidence level
Definition The confidence level , often written as a percentage, is the coverage probability that an interval procedure is designed to have. It is chosen before the data are seen. For the z interval, level uses the critical value , the number with when , and the interval is
| Confidence level | percent | percent | percent |
|---|---|---|---|
| Critical value |
In plain words For the z interval with the same data, a higher confidence level means a larger critical value and a wider interval. A normal-based interval with 100 percent confidence would have to be the whole number line, which tells us nothing. The level belongs to the procedure, so it is set in advance and not adjusted after seeing whether the interval includes a value someone hoped for.
Example For and , the 90 percent interval is , about , and the 99 percent interval is , about . The 95 percent interval lies between them. All three are centered at .
Coverage probability
Definition The coverage probability of an interval procedure at a parameter value is the probability, computed under the model with and any other parameters fixed, that the random interval contains . For the z interval, with , the interval contains exactly when the standardized sample mean lies between and ,
Under independent normal sampling with known the middle quantity has the distribution, so the coverage is exactly for every value of . The level a procedure is designed for is its nominal coverage. The actual coverage under the process that really produced the data can differ when the assumptions fail.
In plain words Coverage is a property of the procedure under stated assumptions. If the assumptions are wrong, the advertised level can be wrong too. Replacing by the sample SD while keeping the critical value is one example. Under normal sampling the actual coverage of that shortcut is about with and about with . A sample of volunteers instead of a random sample can shift every interval away from the target, and the stated coverage does not account for that.
Example Keep and , suppose a simulation model has , and look at five hand-picked sample means, , , , and . A 95 percent interval contains exactly when its center is within of , so all five do. A 90 percent interval needs the center within , so the intervals centered at and miss. These five means were chosen by hand, so the counts say nothing about coverage. Coverage concerns random samples, and under the model .
Margin of error
Definition For an interval of the form estimate , the margin of error is the half-width, and the full width is . For the z interval
It grows with the confidence level and with , and it is proportional to . It reflects only random sampling variation under the model. It does not include bias from how the data were collected, such as selection of the sample, nonresponse or measurement error.
In plain words To halve the margin at the same confidence level, quadruple the sample size. A larger sample makes the mean more precise, but it does not make individual observations less variable. A very large sample of volunteers can produce a narrow interval around the wrong value.
Example With and , the standard error is and the 95 percent margin is about , for a full width of about . With the standard error is and the margin is about , half as large. The SD of individual observations is in both cases.
Repeated-sampling interpretation
Definition Imagine repeating the whole study many times independently with the parameter fixed, each time drawing a new sample and computing an interval by the same rule. The repeated-sampling interpretation says that the long-run proportion of these intervals that contain equals the coverage probability, which is for an exact procedure whose assumptions hold. Once the data are observed, a computed interval such as either contains the fixed or does not, and the 95 percent describes the method that produced it. A probability that lies in a particular interval treats as uncertain, and it is the kind of statement a Bayesian credible interval makes from a prior and the data.
In plain words Confidence is earned by the method, not by any single interval. It is also about the parameter, not about individual values. In this model individual observations have SD , so even an interval of width centered exactly at would contain only about 30 percent of individual observations. The interval also does not say that every value inside it is equally plausible or that values just outside it are impossible.
Example Run the 95 percent procedure on independent samples. The number of intervals that contain is a binomial random variable with trials and success probability . Its mean is , yet the chance of exactly covering intervals is only about , and the chance that all cover is about . The level describes the long run, not a guaranteed count in any finite batch.
Check yourself
- Independent observations come from a normal population with known . A sample of has . Find the standard error, the 95 percent margin of error and the 95 percent interval. What happens to the margin if the sample size is instead?
Show the answer
The standard error is , and the margin is about , so the interval is about . With the standard error is and the margin is about , half as large. The larger sample would also have its own sample mean, so the center would usually move, but the margin halves whatever that mean turns out to be.
- The 95 percent interval for a mean comes from independent normal observations with known . From it a report concludes that 95 percent of customers have values between and , and that there is a 95 percent probability that lies between those numbers. Correct both statements, then say what happens to the interval if the level is raised to 99 percent with the same data.
Show the answer
The interval estimates the population mean, not the spread of individual customers. In this model individual values are normal with SD , so at most about 30 percent of them fall in any range this narrow. The 95 percent describes the procedure, which covers the fixed in 95 percent of repeated samples under its assumptions. This particular interval either contains or does not, and a probability statement about would need a Bayesian analysis with a prior. Raising the level to 99 percent raises the critical value from about to about , so the interval widens to about around the same center.
- An analyst plans a 95 percent interval to compare with a benchmark of . The 95 percent interval includes , so the analyst reports the 90 percent interval instead, which excludes it. The rule in use is to report the 90 percent interval when it excludes and the 95 percent interval otherwise. If in fact , what is the coverage of this rule?
Show the answer
When the 90 percent interval contains , the rule reports the 95 percent interval, which is wider around the same center and also contains it. When the 90 percent interval excludes , the rule reports that interval, which misses. So the rule covers exactly when the 90 percent interval does, and its coverage there is , not the advertised . Choosing the level after seeing the data changes the procedure, and the stated confidence no longer describes it.