Template:Short description Template:Expert needed

File:Normal distribution 50% CI illustration.svg
Each row of points is a sample from the same normal distribution. The colored lines are 50% confidence intervals for the population mean μ. At the center of each interval is the sample mean <math display="inline">\bar{x}</math>, marked with a diamond. The blue intervals contain μ, and the red ones do not. 50 % of all intervals (blues) have the population mean.

In statistics, a confidence interval (CI) is a range of values used to estimate an unknown statistical parameter, such as a population mean.<ref name="using_confidently">Template:Cite journal</ref> Rather than reporting a single point estimate (e.g. "the average screen time is 3 hours per day"), a confidence interval provides a range, such as 2 to 4 hours, along with a specified confidence level, typically 95%. This indicates that if the same sampling procedure were repeated 100 times, approximately 95 of the resulting intervals would be expected to contain the true population mean.

A 95% confidence level does not imply a 95% probability that the true parameter lies within a particular calculated interval. The confidence level instead reflects the long-run reliability of the method used to generate the interval.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

HistoryEdit

Methods for calculating confidence intervals for the binomial proportion appeared from the 1920s.<ref>Edwin B. Wilson (1927) Probable Inference, the Law of Succession, and Statistical Inference, Journal of the American Statistical Association, 22:158, 209-212, https://doi.org/10.1080/01621459.1927.10502953</ref><ref>C.J. Clopper, E.S. Pearson, The use of confidence or fiducial limits illustrated in the case of the binomial, Biometrika 26(4), 1934, pages 404–413, https://doi.org/10.1093/biomet/26.4.404</ref> The main ideas of confidence intervals in general were developed in the early 1930s,<ref name="Neyman1934">Neyman, J. (1934). On the Two Different Aspects of the Representative Method: The Method of Stratified Sampling and the Method of Purposive Selection. Journal of the Royal Statistical Society, 97(4), 558–625. https://doi.org/10.2307/2342192 (see Note I in the appendix)</ref><ref>J. Neyman (1935), Ann. Math. Statist. 6(3): 111-116 (September, 1935). https://doi.org/10.1214/aoms/1177732585</ref><ref name="Neyman1970">Neyman, J. (1970). A glance at some of my personal experiences in the process of research. In Scientists at Work: Festschrift in honour of Herman Wold. Edited by T. Dalenius, G. Karlsson, S. Malmquist. Almqvist & Wiksell, Stockholm. https://worldcat.org/en/title/195948</ref> and the first thorough and general account was given by Jerzy Neyman in 1937.<ref name="Neyman" />

Neyman described the development of the ideas as follows (reference numbers have been changed):<ref name="Neyman1970" />

[My work on confidence intervals] originated about 1930 from a simple question of Waclaw Pytkowski, then my student in Warsaw, engaged in an empirical study in farm economics. The question was: how to characterize non-dogmatically the precision of an estimated regression coefficient? ...

Pytkowski's monograph ... appeared in print in 1932.<ref>Pytkowski, W., The dependence of the income in small farms upon their area, the outlay and the capital invested in cows. (Polish, English summary) Bibliotaka Palawska, 1932.</ref> It so happened that, somewhat earlier, Fisher published his first paper<ref>Template:Cite journal</ref> concerned with fiducial distributions and fiducial argument. Quite unexpectedly, while the conceptual framework of fiducial argument is entirely different from that of confidence intervals, the specific solutions of several particular problems coincided. Thus, in the first paper in which I presented the theory of confidence intervals, published in 1934,<ref name="Neyman1934" /> I recognized Fisher's priority for the idea that interval estimation is possible without any reference to Bayes' theorem and with the solution being independent from probabilities a priori. At the same time I mildly suggested that Fisher's approach to the problem involved a minor misunderstanding.

In medical journals, confidence intervals were promoted in the 1970s but only became widely used in the 1980s.<ref>Template:Cite journal</ref> By 1988, medical journals were requiring the reporting of confidence intervals.<ref>Template:Cite journal</ref>

DefinitionEdit

Let <math>X</math> be a random sample from a probability distribution with statistical parameter <math>(\theta, \varphi)</math>. Here, <math>\theta</math> is the quantity to be estimated, while <math>\varphi</math> includes other parameters (if any) that determine the distribution. A confidence interval for the parameter <math>\theta</math>, with confidence level or coefficient <math>\gamma</math>, is an interval <math>(u(X), v(X))</math> determined by random variables <math>u(X)</math> and <math>v(X)</math> with the property:

<math>P(u(X) < \theta < v(X)) = \gamma \quad \text{for all }(\theta, \varphi).</math>

The number <math>\gamma</math>, whose typical value is close to but not greater than 1, is sometimes given in the form <math>1 - \alpha</math> (or as a percentage <math>100%\cdot(1 - \alpha)</math>), where <math>\alpha</math> is a small positive number, often 0.05. It means that the interval <math display="inline">(u(X), v(X))</math> has a probability <math display="inline">\gamma</math> of covering the value of <math display="inline">\theta</math> in repeated sampling.

In many applications, confidence intervals that have exactly the required confidence level are hard to construct, but approximate intervals can be computed. The rule for constructing the interval may be accepted if

<math>P(u(X) < \theta<v(X)) \approx\ \gamma</math>

to an acceptable level of approximation. Alternatively, some authors<ref>Template:Cite book</ref> simply require that

<math>P(u(X) < \theta < v(X)) \ge\ \gamma</math>

When it is known that the coverage probability can be strictly larger than <math>\gamma</math> for some parameter values, the confidence interval is called conservative, i.e., it errs on the safe side; which also means that the interval can be wider than need be.

Methods of derivationEdit

There are many ways of calculating confidence intervals, and the best method depends on the situation. Two widely applicable methods are bootstrapping and the central limit theorem.<ref name="Dekking">Template:Cite journal</ref> The latter method works only if the sample is large, since it entails calculating the sample mean <math>\bar{X}_n</math> and sample standard deviation <math>S_n</math> and assuming that the quantity

<math>\frac{\bar{X}_n - \mu}{S_n / \sqrt{n}}</math>

is normally distributed, where <math display="inline">\mu</math> and <math>n</math> are the population mean and the sample size, respectively.

ExampleEdit

File:Confidenceinterval.svg
In this bar chart, the top ends of the brown bars indicate observed means and the red line segments ("error bars") represent the confidence intervals around them. Although the error bars are shown as symmetric around the means, that is not always the case. In most graphs, the error bars do not represent confidence intervals (e.g., they often represent standard errors or standard deviations).

Suppose <math>X_1, \ldots, X_n</math> is an independent sample from a normally distributed population with unknown parameters mean <math>\mu</math> and variance <math>\sigma^2.</math> Define the sample mean <math>\bar{X}</math> and unbiased sample variance <math>S^2</math> as

<math>\bar{X} = \fracTemplate:X 1 + \cdots + X nTemplate:N,</math>
<math>S^2 = \fracTemplate:1Template:N-1\sum_{i=1}^n (X_i - \bar{X})^2.</math>

Then the value

<math>T = \frac{{\bar{X} - \mu}}{{S/\sqrt{n}}}</math>

has a Student's t distribution with <math>n - 1</math> degrees of freedom.<ref>Rees, D.G. (2001). Essential Statistics, 4th Edition, Chapman and Hall/CRC. Template:Isbn (Section 9.5)</ref> This value is useful because its distribution does not depend on the values of the unobservable parameters <math>\mu</math> and <math>\sigma^2</math>; i.e., it is a pivotal quantity.

Suppose we wanted to calculate a 95% confidence interval for <math>\mu.</math> First, let <math>c</math> be the 97.5th percentile of the distribution of <math>T</math>. Then there is a 2.5% chance that <math>T</math> will be less than <math display="inline">-c</math> and a 2.5% chance that it will be larger than <math display="inline">+c</math> (as the t distribution is symmetric about 0). In other words,

<math>P_T(-c \leq T \leq c) = 0.95.</math>

Consequently, by replacing <math display="inline">T</math> with <math>\frac{{\bar{X} - \mu}}{{S/\sqrt{n}}}</math> and re-arranging terms,

<math>P_X {\left(\bar{X} - \fracTemplate:CS{{\sqrt{n}}} \leq \mu \leq \bar{X} + \fracTemplate:CS{{\sqrt{n}}}\right)} = 0.95</math>

where <math>P_X</math> is the probability measure for the sample <math>X_1, \ldots, X_n</math>.

It means that there is 95% probability with which this condition <math>\bar{X} - \fracTemplate:CS{{\sqrt{n}}} \leq \mu \leq \bar{X} + \fracTemplate:CS{{\sqrt{n}}}</math> occurs in repeated sampling. After observing a sample, we find values <math>\bar{x}</math> for <math>\bar{X}</math> and <math>s</math> for <math>S,</math> from which we compute the below interval, and we say it is a 95% confidence interval for the mean.

<math>\left[\bar{x} - \frac{cs}{\sqrt{n}}, \bar{x} + \frac{cs}{\sqrt{n}}\right].</math>

InterpretationEdit

Various interpretations of a confidence interval can be given (taking the 95% confidence interval as an example in the following).

  • The confidence interval can be expressed in terms of a long-run frequency in repeated samples (or in resampling): "Were this procedure to be repeated on numerous samples, the proportion of calculated 95% confidence intervals that encompassed the true value of the population parameter would tend toward 95%."<ref name="CH" />
  • The confidence interval can be expressed in terms of probability with respect to a single theoretical (yet to be realized) sample: "There is a 95% probability that the 95% confidence interval calculated from a given future sample will cover the true value of the population parameter."<ref name="Neyman" /> This essentially reframes the "repeated samples" interpretation as a probability rather than a frequency.
  • The confidence interval can be expressed in terms of statistical significance, e.g.: "The 95% confidence interval represents values that are not statistically significantly different from the point estimate at the .05 level."<ref>Cox D.R., Hinkley D.V. (1974) Theoretical Statistics, Chapman & Hall, pp. 214, 225, 233</ref>
File:95% confidence interval.svg
Interpretation of the 95% confidence interval in terms of statistical significance.

Common misunderstandingsEdit

File:Neyman Construction Confidence Intervals.png
A plot of 50 confidence intervals from 50 samples generated from a normal distribution

Confidence intervals and levels are frequently misunderstood, and published studies have shown that even professional scientists often misinterpret them.<ref>Hoekstra, R., R. D. Morey, J. N. Rouder, and E-J. Wagenmakers, 2014. Robust misinterpretation of confidence intervals. Psychonomic Bulletin & Review Vol. 21, No. 5, pp. 1157-1164. [1]</ref>

  • A 95% confidence level does not mean that for a given realized interval there is a 95% probability that the population parameter lies within the interval.<ref name="Morey" /><ref name=":2"/>
  • A 95% confidence level does not mean that 95% of the sample data lie within the confidence interval.<ref name="using_confidently"/>
  • A 95% confidence level does not mean that there is a 95% probability of the parameter estimate from a repeat of the experiment falling within the confidence interval computed from a given experiment.<ref name=":2">Template:Cite journal</ref>

For example, suppose a factory produces metal rods. A random sample of 25 rods gives a 95% confidence interval for the population mean length of 36.8 to 39.0 mm.<ref name="Tan">Template:Cite journal</ref>

  • It is incorrect to say that there is a 95% probability that the true population mean lies within this interval, because the true mean is fixed, not random. For example, it might be 37 mm, which is within the confidence interval, or 40 mm, which is not; in any case, whether it falls between 36.8 and 39.0 mm is a matter of fact, not probability.
  • It is not necessarily true that the lengths of 95% of the sampled rods lie within this interval. In this case, it cannot be true: 95% of 25 is not an integer.
  • It is incorrect to say that if we took a second sample, there is a 95% probability that the sample mean length (an estimate of the population mean length) would fall within this interval. In fact, if the true mean length is far from this specific confidence interval, it could be very unlikely that the next sample mean falls within the interval.

Instead, the 95% confidence level means that if we took 100 such samples, we would expect the true population mean to lie within approximately 95 of the calculated intervals.<ref name="using_confidently"/><ref name="Morey" /><ref name=":2"/><ref name="Tan"/>

Comparison with prediction intervalsEdit

A confidence interval is used to estimate a population parameter, such as the mean. For example, the expected value of a fair six-sided die is 3.5. Based on repeated sampling, after computing many 95% confidence intervals, roughly 95% of them will contain 3.5.

A prediction interval, on the other hand, provides a range within which a future individual observation is expected to fall with a certain probability. In the case of a single roll of a fair six-sided die, the outcome will always lie between 1 and 6. Thus, a 95% prediction interval for a future roll is approximately [1, 6], since this range captures the inherent variability of individual outcomes.

The key distinction is that confidence intervals quantify uncertainty in estimating parameters, while prediction intervals quantify uncertainty in forecasting future observations.

Comparison with credible intervalsEdit

In many common settings, such as estimating the mean of a normal distribution with known variance,<ref>Template:Cite book</ref> confidence intervals coincide with credible intervals under non-informative priors. In such cases, common misconceptions about confidence intervals (e.g. interpreting them as probability statements about the parameter) may yield practically correct conclusions.

Examples of how naïve interpretation of confidence intervals can be problematicEdit

Confidence procedure for uniform locationEdit

File:Welch and Bayes intervals.svg
Ten examples of the 50% Welch and Bayesian intervals are shown in contrasting white and gray rows. The examples are sorted top-to-bottom by decreasing distance between <math>X_1</math> and <math>X_2</math>.

Welch<ref>Template:Cite journal</ref> presented an example which clearly shows the difference between the theory of confidence intervals and other theories of interval estimation (including Fisher's fiducial intervals and objective Bayesian intervals). Robinson<ref>Template:Cite journal</ref> called this example "[p]ossibly the best known counterexample for Neyman's version of confidence interval theory." To Welch, it showed the superiority of confidence interval theory; to critics of the theory, it shows a deficiency. Here we present a simplified version.

Suppose that <math>X_1,X_2</math> are independent observations from a uniform <math>(\theta - 1/2, \theta + 1/2)</math> distribution. Then the optimal 50% confidence procedure for <math>\theta</math> is<ref>Template:Cite journal</ref>

<math>\bar{X} \pm \begin{cases}

\dfrac{|X_1-X_2|}{2} & \text{if } |X_1-X_2| < 1/2 \\[8pt] \dfrac{1-|X_1-X_2|}{2} &\text{if } |X_1-X_2| \geq 1/2. \end{cases} </math>

A fiducial or objective Bayesian argument can be used to derive the interval estimate

<math>\bar{X} \pm \frac{1-|X_1-X_2|}{4},</math>

which is also a 50% confidence procedure. Welch showed that the first confidence procedure dominates the second, according to desiderata from confidence interval theory; for every <math>\theta_1\neq\theta</math>, the probability that the first procedure contains <math>\theta_1</math> is less than or equal to the probability that the second procedure contains <math>\theta_1</math>. The average width of the intervals from the first procedure is less than that of the second. Hence, the first procedure is preferred under classical confidence interval theory.

However, when <math>|X_1-X_2| \geq 1/2</math>, intervals from the first procedure are guaranteed to contain the true value <math>\theta</math>: Therefore, the nominal 50% confidence coefficient is unrelated to the uncertainty we should have that a specific interval contains the true value. The second procedure does not have this property.

Moreover, when the first procedure generates a very short interval, this indicates that <math>X_1,X_2</math> are very close together and hence only offer the information in a single data point. Yet the first interval will exclude almost all reasonable values of the parameter due to its short width. The second procedure does not have this property.

The two counter-intuitive properties of the first procedure – 100% coverage when <math>X_1,X_2</math> are far apart and almost 0% coverage when <math>X_1,X_2</math> are close together – balance out to yield 50% coverage on average. However, despite the first procedure being optimal, its intervals offer neither an assessment of the precision of the estimate nor an assessment of the uncertainty one should have that the interval contains the true value.

This example is used to argue against naïve interpretations of confidence intervals. If a confidence procedure is asserted to have properties beyond that of the nominal coverage (such as relation to precision, or a relationship with Bayesian inference), those properties must be proved; they do not follow from the fact that a procedure is a confidence procedure.

Confidence procedure for ω2Edit

Steiger<ref>Template:Cite journal</ref> suggested a number of confidence procedures for common effect size measures in ANOVA. Morey et al.<ref name=Morey /> point out that several of these confidence procedures, including the one for ω2, have the property that as the F statistic becomes increasingly small—indicating misfit with all possible values of ω2—the confidence interval shrinks and can even contain only the single value ω2 = 0; that is, the CI is infinitesimally narrow (this occurs when <math>p\geq1-\alpha/2</math> for a <math>100(1-\alpha)\%</math> CI).

This behavior is consistent with the relationship between the confidence procedure and significance testing: as F becomes so small that the group means are much closer together than we would expect by chance, a significance test might indicate rejection for most or all values of ω2. Hence the interval will be very narrow or even empty (or, by a convention suggested by Steiger, containing only 0). However, this does not indicate that the estimate of ω2 is very precise. In a sense, it indicates the opposite: that the trustworthiness of the results themselves may be in doubt. This is contrary to the common interpretation of confidence intervals that they reveal the precision of the estimate.

Confidence interval for specific distributionsEdit

See alsoEdit

ReferencesEdit

Template:Reflist

BibliographyEdit

Template:Refbegin Template:Divcol

Template:Divcolend Template:Refend

External linksEdit

Template:Sister project

|_exclude=urlname, _debug, id |url = https://mathworld.wolfram.com/{{#if:ConfidenceInterval%7CConfidenceInterval.html}} |title = Confidence Interval |author = Weisstein, Eric W. |website = MathWorld |access-date = |ref = Template:SfnRef }}

Template:Statistics

Template:Authority control