This article has multiple issues. Please help talk page. (Learn how and when to remove these template messages)or discuss these issues on the
In statistics, a confidence interval (CI) is a type of estimate computed from the observed data. This gives a range of values for an unknown parameter (for example, a population mean). The interval has an associated confidence level chosen by the investigator. For a given estimation in a given sample, using a higher confidence level generates a wider (i.e., less precise) confidence interval. In general terms, a confidence interval for an unknown parameter is based on sampling the distribution of a corresponding estimator.
This means that the confidence level represents the theoretical long-run frequency (i.e., the proportion) of confidence intervals that contain the true value of the unknown population parameter. In other words, 90% of confidence intervals computed at the 90% confidence level contain the parameter, 95% of confidence intervals computed at the 95% confidence level contain the parameter, 99% of confidence intervals computed at the 99% confidence level contain the parameter, etc.
The confidence level is designated before examining the data. Most commonly, a 95% confidence level is used. However, other confidence levels, such as 90% or 99%, are sometimes used.
Factors affecting the width of the confidence interval include the size of the sample, the confidence level, and the variability in the sample. A larger sample will tend to produce a better estimate of the population parameter, when all other factors are equal. A higher confidence level will tend to produce a broader confidence interval.
Another way to express the form of confidence interval is a set of two parameters: (point estimate - error bound, point estimate + error bound), or symbolically expressed as (-EBM, +EBM), where (point estimate) serves as an estimate for m (the population mean) and EBM is the error bound for a population mean.
The margin of error (EBM) depends on the confidence level.
A rigorous general definition:
Suppose a dataset is given, modeled as realization of random variables . Let be the parameter of interest, and a number between 0 and 1. If there exist sample statistics and such that:
for every value of
then , where and , is called a confidence interval for . The number is called the confidence level.
Interval estimation can be contrasted with point estimation. A point estimate is a single value given as the estimate of a population parameter that is of interest, for example, the mean of some quantity. An interval estimate specifies instead a range within which the parameter is estimated to lie. Confidence intervals are commonly reported in tables or graphs along with point estimates of the same parameters, to show the reliability of the estimates.
For example, a confidence interval can be used to describe how reliable survey results are. In a poll of election-voting intentions, the result might be that 40% of respondents intend to vote for a certain party. A 99% confidence interval for the proportion in the whole population having the same intention on the survey might be 30% to 50%. From the same data one may calculate a 90% confidence interval, which in this case might be 37% to 43%. A major factor determining the length of a confidence interval is the size of the sample used in the estimation procedure, for example, the number of people taking part in a survey.
Various interpretations of a confidence interval can be given (taking the 90% confidence interval as an example in the following).
In each of the above, the following applies: If the true value of the parameter lies outside the 90% confidence interval, then a sampling event has occurred (namely, obtaining a point estimate of the parameter at least this far from the true parameter value) which had a probability of 10% (or less) of happening by chance.
"It will be noticed that in the above description, the probability statements refer to the problems of estimation with which the statistician will be concerned in the future. In fact, I have repeatedly stated that the frequency of correct results will tend to ?. Consider now the case when a sample is already drawn, and the calculations have given [particular limits]. Can we say that in this particular case the probability of the true value [falling between these limits] is equal to ?? The answer is obviously in the negative. The parameter is an unknown constant, and no probability statement concerning its value may be made..."
"It must be stressed, however, that having seen the value [of the data], Neyman-Pearson theory never permits one to conclude that the specific confidence interval formed covers the true value of 0 with either (1 - ?)100% probability or (1 - ?)100% degree of confidence. Seidenfeld's remark seems rooted in a (not uncommon) desire for Neyman-Pearson confidence intervals to provide something which they cannot legitimately provide; namely, a measure of the degree of probability, belief, or support that an unknown parameter value lies in a specific interval. Following Savage (1962), the probability that a parameter lies in a specific interval may be referred to as a measure of final precision. While a measure of final precision may seem desirable, and while confidence levels are often (wrongly) interpreted as providing such a measure, no such interpretation is warranted. Admittedly, such a misinterpretation is encouraged by the word 'confidence'."
In the earliest modern controlled clinical trial of a medical treatment for acute stroke, published by Dyken and White in 1959, the investigators were unable to reject the null hypothesis of no effect of cortisol on stroke. Nonetheless, they concluded that their trial "clearly indicated no possible advantage of treatment with cortisone". Dyken and White did not calculate confidence intervals, which were rare at that time in medicine. When Peter Sandercock reevaluated the data in 2015, he found that the 95% confidence interval stretched from a 12% reduction in risk to a 140% increase in risk. Therefore, the authors' statement was not supported by their experiment. Sandercock concluded that, especially in the medical sciences, where datasets can be small, confidence intervals are better than hypothesis tests for quantifying uncertainty around the size and direction of an effect.
It wasn't until the 1980s that journals required confidence intervals and p-values to be reported in papers. By 1992, imprecise estimates were still common, even for large trials. This prevented a clear decision regarding the null hypothesis. For example, a study of medical therapies for acute stroke came to the conclusion that the stroke treatments could reduce mortality or increase it by 10%-20%. Strict admittance to the study introduced unforeseen error, further increasing uncertainty in the conclusion. Studies persisted, and it wasn't until 1997 that a trial with a massive sample pool and acceptable confidence interval was able to provide a definitive answer: cortisol therapy does not reduce the risk of acute stroke.
The principle behind confidence intervals was formulated to provide an answer to the question raised in statistical inference of how to deal with the uncertainty inherent in results derived from data that are themselves only a randomly selected subset of a population. There are other answers, notably that provided by Bayesian inference in the form of credible intervals. Confidence intervals correspond to a chosen rule for determining the confidence bounds, where this rule is essentially determined before any data are obtained, or before an experiment is done. The rule is defined such that over all possible datasets that might be obtained, there is a high probability ("high" is specifically quantified) that the interval determined by the rule will include the true value of the quantity under consideration. The Bayesian approach appears to offer intervals that can, subject to acceptance of an interpretation of "probability" as Bayesian probability, be interpreted as meaning that the specific interval calculated from a given dataset has a particular probability of including the true value, conditional on the data and other information available. The confidence interval approach does not allow this since in this formulation and at this same stage, both the bounds of the interval and the true values are fixed values, and there is no randomness involved. On the other hand, the Bayesian approach is only as valid as the prior probability used in the computation, whereas the confidence interval does not depend on assumptions about the prior probability.
The questions concerning how an interval expressing uncertainty in an estimate might be formulated, and of how such intervals might be interpreted, are not strictly mathematical problems and are philosophically problematic. Mathematics can take over once the basic principles of an approach to 'inference' have been established, but it has only a limited role in saying why one approach should be preferred to another: For example, a confidence level of 95% is often used in the biological sciences, but this is a matter of convention or arbitration. In the physical sciences, a much higher level may be used.
Confidence intervals are closely related to statistical significance testing. For example, if for some estimated parameter ? one wants to test the null hypothesis that ? = 0 against the alternative that ? ? 0, then this test can be performed by determining whether the confidence interval for ? contains 0.
More generally, given the availability of a hypothesis testing procedure that can test the null hypothesis ? = ?0 against the alternative that ? ? ?0 for any value of ?0, then a confidence interval with confidence level ? = 1 - ? can be defined as containing any number ?0 for which the corresponding null hypothesis is not rejected at significance level ?.
If the estimates of two parameters (for example, the mean values of a variable in two independent groups) have confidence intervals that do not overlap, then the difference between the two values is more significant than that indicated by the individual values of ?. So, this "test" is too conservative and can lead to a result that is more significant than the individual values of ? would indicate. If two confidence intervals overlap, the two means still may be significantly different. Accordingly, and consistent with the Mantel-Haenszel Chi-squared test, is a proposed fix whereby one reduces the error bounds for the two means by multiplying them by the square root of ½ (0.707107) before making the comparison.
While the formulations of the notions of confidence intervals and of statistical hypothesis testing are distinct, they are in some senses related and to some extent complementary. While not all confidence intervals are constructed in this way, one general purpose approach to constructing confidence intervals is to define a 100(1 - ?)% confidence interval to consist of all those values ?0 for which a test of the hypothesis ? = ?0 is not rejected at a significance level of 100?%. Such an approach may not always be available since it presupposes the practical availability of an appropriate significance test. Naturally, any assumptions required for the significance test would carry over to the confidence intervals.
It may be convenient to make the general correspondence that parameter values within a confidence interval are equivalent to those values that would not be rejected by a hypothesis test, but this would be dangerous. In many instances the confidence intervals that are quoted are only approximately valid, perhaps derived from "plus or minus twice the standard error," and the implications of this for the supposedly corresponding hypothesis tests are usually unknown.
It is worth noting that the confidence interval for a parameter is not the same as the acceptance region of a test for this parameter, as is sometimes thought. The confidence interval is part of the parameter space, whereas the acceptance region is part of the sample space. For the same reason, the confidence level is not the same as the complementary probability of the level of significance.[further explanation needed]
Confidence regions generalize the confidence interval concept to deal with multiple quantities. Such regions can indicate not only the extent of likely sampling errors but can also reveal whether (for example) it is the case that if the estimate for one quantity is unreliable, then the other is also likely to be unreliable.
A confidence band is used in statistical analysis to represent the uncertainty in an estimate of a curve or function based on limited or noisy data. Similarly, a prediction band is used to represent the uncertainty about the value of a new data point on the curve, but subject to noise. Confidence and prediction bands are often used as part of the graphical presentation of results of a regression analysis.
Confidence bands are closely related to confidence intervals, which represent the uncertainty in an estimate of a single numerical value. "As confidence intervals, by construction, only refer to a single point, they are narrower (at this point) than a confidence band which is supposed to hold simultaneously at many points."
This example assumes that the samples are drawn from a normal distribution. The basic procedure for calculating a confidence interval for a population mean is as follows:
Confidence intervals can be calculated using two different values: t-values or z-values, as shown in the basic example above. Both values are tabulated in tables, based on degrees of freedom and the tail of a probability distribution. More often, z-values are used. These are the critical values of the normal distribution with right tail probability. However, t-values are used when the sample size is below 30 and the standard deviation is unknown.
When the variance is unknown, we must use a different estimator: . This allows the formation of a distribution that only depends on and whose density can be expression explicitly.
Definition: A continuous random variable has a t-distribution with parameter m, where is an integer, if its probability density is given by for , where . This distribution is denoted by and is referred to as the t-distribution with m degrees of freedom.
Let X be a random sample from a probability distribution with statistical parameter ?, which is a quantity to be estimated, and ?, representing quantities that are not of immediate interest. A confidence interval for the parameter ?, with confidence level or confidence coefficient ?, is an interval with random endpoints (u(X), v(X)), determined by the pair of random variables u(X) and v(X), with the property:
The quantities ? in which there is no immediate interest are called nuisance parameters, as statistical theory still needs to find some way to deal with them. The number ?, with typical values close to but not greater than 1, is sometimes given in the form 1 - ? (or as a percentage 100%·(1 - ?)), where ? is a small non-negative number, close to 0.
Here Pr?,? indicates the probability distribution of X characterised by (?, ?). An important part of this specification is that the random interval (u(X), v(X)) covers the unknown value ? with a high probability no matter what the true value of ? actually is.
Note that here Pr?,? need not refer to an explicitly given parameterized family of distributions, although it often does. Just as the random variable X notionally corresponds to other possible realizations of x from the same population or from the same version of reality, the parameters (?, ?) indicate that we need to consider other versions of reality in which the distribution of X might have different characteristics.
In a specific situation, when x is the outcome of the sample X, the interval (u(x), v(x)) is also referred to as a confidence interval for ?. Note that it is no longer possible to say that the (observed) interval (u(x), v(x)) has probability ? to contain the parameter ?. This observed interval is just one realization of all possible intervals for which the probability statement holds.
In many applications, confidence intervals that have exactly the required confidence level are hard to construct. But practically useful intervals can still be found: the rule for constructing the interval may be accepted as providing a confidence interval at level if
to an acceptable level of approximation. Alternatively, some authors simply require that
which is useful if the probabilities are only partially identified or imprecise, and also when dealing with discrete distributions. Confidence limits of form and are called conservative; accordingly, one speaks of conservative confidence intervals and, in general, regions.
When applying standard statistical procedures, there will often be standard ways of constructing confidence intervals. These will have been devised so as to meet certain desirable properties, which will hold given that the assumptions on which the procedure rely are true. These desirable properties may be described as: validity, optimality, and invariance. Of these "validity" is most important, followed closely by "optimality". "Invariance" may be considered as a property of the method of derivation of a confidence interval rather than of the rule for constructing the interval. In non-standard applications, the same desirable properties would be sought.
For non-standard applications, there are several routes that might be taken to derive a rule for the construction of confidence intervals. Established rules for standard procedures might be justified or explained via several of these routes. Typically a rule for constructing confidence intervals is closely tied to a particular way of finding a point estimate of the quantity being considered.
Medical research often estimates the effects of an intervention or exposure in a certain population. Usually, researchers have determined the significance of the effects based on the p-value; however, recently there has been a push for more statistical information in order to provide a stronger basis for the estimations. One way to resolve this issue is also requiring the reporting of the confidence interval. Below are two examples of how confidence intervals are used and reported for research.
In a 2004 study, Briton and colleagues conducted a study on evaluating relation of infertility to ovarian cancer. The incidence ratio of 1.98 was reported for a 95% Confidence (CI) interval with a ratio range of 1.4 to 2.6. The statistic was reported as the following in the paper: "(standardized incidence ratio = 1.98; 95% CI, 1.4-2.6)." This means that, based on the sample studied, infertile females have an ovarian cancer incidence that is 1.98 times higher than non-infertile females. Furthermore, it also means that we are 95% confident that the true incidence ratio in all the infertile female population lies in the range from 1.4 to 2.6. Overall, the confidence interval provided more statistical information in that it reported the lowest and largest effects that are likely to occur for the studied variable while still providing information on the significance of the effects observed.
In a 2018 study, the prevalence and disease burden of atopic dermatitis in the US Adult Population was understood with the use of 95% confidence intervals. It was reported that among 1,278 participating adults, the prevalence of atopic dermatitis was 7.3% (5.9-8.8). Furthermore, 60.1% (56.1-64.1) of participants were classified to have mild atopic dermatitis while 28.9% (25.3-32.7) had moderate and 11% (8.6-13.7) had severe. The study confirmed that there is a high prevalence and disease burden of atopic dermatitis in the population.
has a Student's t distribution with n - 1 degrees of freedom. Note that the distribution of T does not depend on the values of the unobservable parameters ? and ?2; i.e., it is a pivotal quantity. Suppose we wanted to calculate a 95% confidence interval for ?. Then, denoting c as the 97.5th percentile of this distribution,
Note that "97.5th" and "0.95" are correct in the preceding expressions. There is a 2.5% chance that will be less than and a 2.5% chance that it will be larger than . Thus, the probability that will be between and is 95%.
and we have a theoretical (stochastic) 95% confidence interval for ?.
After observing the sample we find values x for X and s for S, from which we compute the confidence interval
an interval with fixed numbers as endpoints, of which we can no longer say there is a certain probability it contains the parameter ?; either ? is in this interval or isn't.
Confidence intervals are one method of interval estimation, and the most widely used in frequentist statistics. An analogous concept in Bayesian statistics is credible intervals, while an alternative frequentist method is that of prediction intervals which, rather than estimating parameters, estimate the outcome of future samples. For other approaches to expressing uncertainty using intervals, see interval estimation.
A prediction interval for a random variable is defined similarly to a confidence interval for a statistical parameter. Consider an additional random variable Y which may or may not be statistically dependent on the random sample X. Then (u(X), v(X)) provides a prediction interval for the as-yet-to-be observed value y of Y if
Here ? is used to emphasize that the unknown value of ? is being treated as a random variable. The definitions of the two types of intervals may be compared as follows.
Note that the treatment of the nuisance parameters above is often omitted from discussions comparing confidence and credible intervals but it is markedly different between the two cases.
In some cases, a confidence interval and credible interval computed for a given parameter using a given dataset are identical. But in other cases, the two can be very different, particularly if informative prior information is included in the Bayesian analysis.
There is disagreement about which of these methods produces the most useful results: the mathematics of the computations are rarely in question-confidence intervals being based on sampling distributions, credible intervals being based on Bayes' theorem-but the application of these methods, the utility and interpretation of the produced statistics, is debated.
An approximate confidence interval for a population mean can be constructed for random variables that are not normally distributed in the population, relying on the central limit theorem, if the sample sizes and counts are big enough. The formulae are identical to the case above (where the sample mean is actually normally distributed about the population mean). The approximation will be quite good with only a few dozen observations in the sample if the probability distribution of the random variable is not too different from the normal distribution (e.g. its cumulative distribution function does not have any discontinuities and its skewness is moderate).
One type of sample mean is the mean of an indicator variable, which takes on the value 1 for true and the value 0 for false. The mean of such a variable is equal to the proportion that has the variable equal to one (both in the population and in any sample). This is a useful property of indicator variables, especially for hypothesis testing. To apply the central limit theorem, one must use a large enough sample. A rough rule of thumb is that one should see at least 5 cases in which the indicator is 1 and at least 5 in which it is 0. Confidence intervals constructed using the above formulae may include negative numbers or numbers greater than 1, but proportions obviously cannot be negative or exceed 1. Additionally, sample proportions can only take on a finite number of values, so the central limit theorem and the normal distribution are not the best tools for building a confidence interval. See "Binomial proportion confidence interval" for better methods which are specific to this case.
Since confidence interval theory was proposed, a number of counter-examples to the theory have been developed to show how the interpretation of confidence intervals can be problematic, at least if one interprets them naïvely.
Welch 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 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.
A fiducial or objective Bayesian argument can be used to derive the interval estimate
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 , the probability that the first procedure contains is less than or equal to the probability that the second procedure contains . 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 , intervals from the first procedure are guaranteed to contain the true value : 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 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 are far apart and almost 0% coverage when 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 counter-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.
Steiger suggested a number of confidence procedures for common effect size measures in ANOVA. Morey et al. 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 for a 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.