TOPICS
Search

Confidence Interval


A confidence interval is an interval constructed from a sample to estimate an unknown population parameter. Under the assumed statistical model, the probability that the interval contains the true parameter value over repeated sampling is at least the specified confidence level.

For example, for N independent observations from a normal distribution with unknown mean mu and known standard deviation sigma, an exact level-P confidence interval for mu is x^_+/-z_((1+P)/2)sigma/sqrt(N), where 0<P<1, x^_ is the sample mean, and z_q is the q-quantile of the standard normal distribution.

An interval for an individual observation has a different coverage event. Its endpoints are fixed by the assumed distribution, and its coverage is the probability that the observation lies between those endpoints. For a probability density function P(x) symmetric about zero, the central interval [-a,a] contains 50% of the probability when

 1/2=int_(-a)^aP(x)dx.
(1)
ConfidenceIntervalProbability

For a normal distribution, the probability that a measurement falls within n standard deviations (nsigma) of the mean mu (i.e., within the interval [mu-nsigma,mu+nsigma]) is given by

P(mu-nsigma<x<mu+nsigma)=1/(sigmasqrt(2pi))int_(mu-nsigma)^(mu+nsigma)e^(-(x-mu)^2/(2sigma^2))dx
(2)
=2/(sigmasqrt(2pi))int_mu^(mu+nsigma)e^(-(x-mu)^2/(2sigma^2))dx.
(3)

Now let u=(x-mu)/(sqrt(2)sigma), so du=dx/(sqrt(2)sigma). Then

P(mu-nsigma<x<mu+nsigma)=2/(sigmasqrt(2pi))sqrt(2)sigmaint_0^(n/sqrt(2))e^(-u^2)du
(4)
=2/(sqrt(pi))int_0^(n/sqrt(2))e^(-u^2)du
(5)
=erf(n/(sqrt(2))),
(6)

where erf(x) is the so-called erf function. The following table summarizes the probabilities P(mu-x_n<x<mu+x_n) that measurements from a normal distribution fall within [mu-x_n,mu+x_n] for x_n=nsigma with small values of n.

x_nP(mu-x_n<x<mu+x_n)
sigma0.6826895
2sigma0.9544997
3sigma0.9973002
4sigma0.9999366
5sigma0.9999994
ConfidenceIntervals

For a single observation from a normal distribution, the number n of standard deviations on either side of the mean needed to enclose probability P is obtained by inverting the preceding relation,

 n=sqrt(2)erf^(-1)(P),
(7)

where erf^(-1)(x) is the inverse erf function. The following table then gives the values of x_P such that [mu-x_P,mu+x_P] has probability content P. These values can be returned by NormalCI[0, 1, ConfidenceLevel -> P] in the Wolfram Language package HypothesisTesting` .

Px_P
0.8001.28155sigma
0.9001.64485sigma
0.9501.95996sigma
0.9902.57583sigma
0.9952.80703sigma
0.9993.29053sigma

See also

Alpha Value, Confidence Limits, Erf, Interval Estimation, Inverse Erf, Normal Distribution, P-Value, Prediction Interval, Significance, Standard Deviation Explore this topic in the MathWorld classroom

Explore with Wolfram|Alpha

References

Kenney, J. F. and Keeping, E. S. "Confidence Limits for the Binomial Parameter" and "Confidence Interval Charts." §11.4 and 11.5 in Mathematics of Statistics, Pt. 1, 3rd ed. Princeton, NJ: Van Nostrand, pp. 167-169, 1962.

Referenced on Wolfram|Alpha

Confidence Interval

Cite this as:

Weisstein, Eric W. "Confidence Interval." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/ConfidenceInterval.html

Subject classifications