Frequent Links
Prediction interval
This article needs attention from an expert on the subject. (November 2010) |
In statistical inference, specifically predictive inference, a prediction interval is an estimate of an interval in which future observations will fall, with a certain probability, given what has already been observed. Prediction intervals are often used in regression analysis.
Prediction intervals are used in both frequentist statistics and Bayesian statistics: a prediction interval bears the same relationship to a future observation that a frequentist confidence interval or Bayesian credible interval bears to an unobservable population parameter: prediction intervals predict the distribution of individual future points, whereas confidence intervals and credible intervals of parameters predict the distribution of estimates of the true population mean or other quantity of interest that cannot be observed. Prediction intervals are also present in forecasts. It is difficult to estimate the prediction intervals of forecasts that have contrary series.^{[1]}
Contents
Introduction
For example, if one makes the parametric assumption that the underlying distribution is a normal distribution, and has a sample set {X_{1}, ..., X_{n}}, then confidence intervals and credible intervals may be used to estimate the population mean μ and population standard deviation σ of the underlying population, while prediction intervals may be used to estimate the value of the next sample variable, X_{n+1}.
Alternatively, in Bayesian terms, a prediction interval can be described as a credible interval for the variable itself, rather than for a parameter of the distribution thereof.
The concept of prediction intervals need not be restricted to inference about a single future sample value but can be extended to more complicated cases. For example, in the context of river flooding where analyses are often based on annual values of the largest flow within the year, there may be interest in making inferences about the largest flood likely to be experienced within the next 50 years.
Since prediction intervals are only concerned with past and future observations, rather than unobservable population parameters, they are advocated as a better method than confidence intervals by some statisticians, such as Seymour Geisser,^{[citation needed]} following the focus on observables by Bruno de Finetti.^{[citation needed]}
Normal distribution
Given a sample from a normal distribution, whose parameters are unknown, it is possible to give prediction intervals in the frequentist sense, i.e., an interval [a, b] based on statistics of the sample such that on repeated experiments, X_{n+1} falls in the interval the desired percentage of the time; one may call these "predictive confidence intervals".^{[2]}
A general technique of frequentist prediction intervals is to find and compute a pivotal quantity of the observables X_{1}, ..., X_{n}, X_{n+1} – meaning a function of observables and parameters whose probability distribution does not depend on the parameters – that can be inverted to give a probability of the future observation X_{n+1} falling in some interval computed in terms of the observed values so far, <math>X_1,\dots,X_n.</math> Such a pivotal quantity, depending only on observables, is called an ancillary statistic.^{[3]} The usual method of constructing pivotal quantities is to take the difference of two variables that depend on location, so that location cancels out, and then take the ratio of two variables that depend on scale, so that scale cancels out. The most familiar pivotal quantity is the Student's t-statistic, which can be derived by this method and is used in the sequel.
Known mean, known variance
A prediction interval [l,u] for a future observation X in a normal distribution N(µ,σ^{2}) with known mean and variance may easily be calculated from
- <math>\gamma=P(l<X<u)=P\left(\frac{l-\mu}{\sigma}<\frac{X-\mu}{\sigma}<\frac{u-\mu}{\sigma}\right)=P\left(\frac{l-\mu}{\sigma}<Z<\frac{u-\mu}{\sigma}\right),</math>
where <math>Z=\frac{X-\mu}{\sigma}</math>, the standard score of X, is standard normal distributed.
Hence
- <math>\frac{l-\mu}{\sigma}=-z,\frac{u-\mu}{\sigma}=z,</math>
or
- <math>l=\mu-z\sigma,u=\mu+z\sigma,</math>
with z the quantile in the standard normal distribution for which:
- <math>\gamma=P(-z<Z<z).</math>
or equivalently;
- <math>\tfrac 12(1-\gamma)=P(Z>z).</math>
Prediction interval |
z |
---|---|
50% | 0.67^{[4]} |
90% | 1.64^{[4]} |
95% | 1.96^{[4]} |
99% | 2.58^{[4]} |
The prediction interval is conventionally written as:
- <math>\left[\mu- z\sigma,\ \mu + z\sigma \right]. </math>
For example, to calculate the 95% prediction interval for a normal distribution with a mean (µ) of 5 and a standard deviation (σ) of 1, then z is approximately 2. Therefore, the lower limit of the prediction interval is approximately 5 ‒ (2·1) = 3, and the upper limit is approximately 5 + (2·1) = 7, thus giving a prediction interval of approximately 3 to 7.
Estimation of parameters
For a distribution with unknown parameters, a direct approach to prediction is to estimate the parameters and then use the associated quantile function – for example, one could use the sample mean <math>\overline{X}</math> as estimate for μ and the sample variance s^{2} as an estimate for σ^{2}. Note that there are two natural choices for s^{2} here – dividing by <math>(n-1)</math> yields an unbiased estimate, while dividing by n yields the maximum likelihood estimator, and either might be used. One then uses the quantile function with these estimated parameters <math>\Phi^{-1}_{\overline{X},s^2}</math> to give a prediction interval.
This approach is usable, but the resulting interval will not have the repeated sampling interpretation^{[5]} – it is not a predictive confidence interval.
For the sequel, use the sample mean:
- <math>\overline{X} = \overline{X}_n=(X_1+\cdots+X_n)/n</math>
and the (unbiased) sample variance:
- <math>s^2 = s_n^2={1 \over n-1}\sum_{i=1}^n (X_i-\overline{X}_n)^2.</math>
Unknown mean, known variance
Given^{[6]} a normal distribution with unknown mean μ but known variance 1, the sample mean <math>\overline{X}</math> of the observations <math>X_1,\dots,X_n</math> has distribution <math>N(\mu,1/n),</math> while the future observation <math>X_{n+1}</math> has distribution <math>N(\mu,1).</math> Taking the difference of these cancels the μ and yields a normal distribution of variance <math>1+(1/n),</math> thus
- <math>\frac{X_{n+1}-\overline{X}}{\sqrt{1+(1/n)}} \sim N(0,1).</math>
Solving for <math>X_{n+1}</math> gives the prediction distribution <math>N(\overline{X},1+(1/n)),</math> from which one can compute intervals as before. This is a predictive confidence interval in the sense that if one uses a quantile range of 100p%, then on repeated applications of this computation, the future observation <math>X_{n+1}</math> will fall in the predicted interval 100p% of the time.
Notice that this prediction distribution is more conservative than using the estimated mean <math>\overline{X}</math> and known variance 1, as this uses variance <math>1+(1/n)</math>, hence yields wider intervals. This is necessary for the desired confidence interval property to hold.
Known mean, unknown variance
Conversely, given a normal distribution with known mean 0 but unknown variance <math>\sigma^2</math>, the sample variance <math>s^2</math> of the observations <math>X_1,\dots,X_n</math> has, up to scale, a <math>\scriptstyle\chi_{n-1}^2</math> distribution; more precisely:
- <math>\frac{(n-1)s_n^2}{\sigma^2} \sim \chi_{n-1}^2.</math>
while the future observation <math>X_{n+1}</math> has distribution <math>N(0,\sigma^2).</math> Taking the ratio of the future observation and the sample standard deviation cancels the σ, yielding a Student's t-distribution with n–1 degrees of freedom:
- <math>\frac{X_{n+1}}{s} \sim T^{n-1}.</math>
Solving for <math>X_{n+1}</math> gives the prediction distribution <math>sT^{n-1},</math> from which one can compute intervals as before.
Notice that this prediction distribution is more conservative than using a normal distribution with the estimated standard deviation <math>s</math> and known mean 0, as it uses the t-distribution instead of the normal distribution, hence yields wider intervals. This is necessary for the desired confidence interval property to hold.
Unknown mean, unknown variance
Combining the above for a normal distribution <math>N(\mu,\sigma^2)</math> with both μ and σ^{2} unknown yields the following ancillary statistic:^{[7]}
- <math>\frac{X_{n+1}-\overline{X}_n}{s_n\sqrt{1+1/n}} \sim T^{n-1}.</math>
This simple combination is possible because the sample mean and sample variance of the normal distribution are independent statistics; this is only true for the normal distribution, and in fact characterizes the normal distribution.
Solving for <math>X_{n+1}</math> yields the prediction distribution
- <math>\overline{X}_n + s_n\sqrt{1+1/n} \cdot T^{n-1}.</math>
The probability of <math>X_{n+1}</math> falling in a given interval is then:
- <math>\Pr\left(\overline{X}_n-T_a s_n\sqrt{1+(1/n)}\leq X_{n+1} \leq\overline{X}_n+T_a s_n\sqrt{1+(1/n)}\,\right)=p</math>
where T_{a} is the 100((1 + p)/2)^{th} percentile of Student's t-distribution with n − 1 degrees of freedom. Therefore the numbers
- <math>\overline{X}_n\pm T_a {s}_n\sqrt{1+(1/n)}</math>
are the endpoints of a 100p% prediction interval for <math>X_{n+1}</math>.
Non-parametric methods
One can compute prediction intervals without any assumptions on the population; formally, this is a non-parametric method.^{[8]}
Suppose one randomly draws a sample of two observations X_{1} and X_{2} from a population in which values are assumed to have a continuous probability distribution
- What is the probability that X_{2} > X_{1}?
The answer is exactly 50%, regardless of the underlying population – the probability of picking 3 and then 7 is the same as picking 7 and then 3, regardless of the particular probability of picking 3 or 7. Thus, if one picks a single sample X_{1}, then 50% of the time the next sample will be greater, which yields (X_{1}, +∞) as a 50% prediction interval for X_{2}. Similarly, 50% of the time it will be smaller, which yields another 50% prediction interval for X_{2}, namely (−∞, X_{1}). Note that the assumption of a continuous distribution avoids the possibililty that values might be exactly equal; this would complicate matters.
Similarly, if one has a sample {X_{1}, ..., X_{n}} then the probability that the next observation X_{n+1} will be the largest is 1/(n + 1), since all observations have equal probability of being the maximum. In the same way, the probability that X_{n+1} will be the smallest is 1/(n + 1). The other (n − 1)/(n + 1) of the time, X_{n+1} falls between the sample maximum and sample minimum of the sample {X_{1}, ..., X_{n}}. Thus, denoting the sample maximum and minimum by M and m, this yields an (n − 1)/(n + 1) prediction interval of [m, M].
For example, if n = 19, then [m, M] gives an 18/20 = 90% prediction interval – 90% of the time, the 20th observation falls between the smallest and largest observation seen heretofore. Likewise, n = 39 gives a 95% prediction interval, and n = 199 gives a 99% prediction interval.
More generally, if X_{(j)} and X_{(k)} are order statistics of the sample with j < k and j + k = n + 1, then [X_{(j)}, X_{(k)}] is a prediction interval for X_{n+1} with coverage probability (significance level) equal to (n + 1 - 2j) / (n + 1).
One can visualize this by drawing the n samples on a line, which divides the line into n + 1 sections (n − 1 segments between samples, and 2 intervals going to infinity at both ends), and noting that X_{n+1} has an equal chance of landing in any of these n + 1 sections. Thus one can also pick any k of these sections and give a k/(n + 1) prediction interval (or set, if the sections are not consecutive). For instance, if n = 2, then the probability that X_{3} will land between the existing 2 observations is 1/3.
Notice that while this gives the probability that a future observation will fall in a range, it does not give any estimate as to where in a segment it will fall – notably, if it falls outside the range of observed values, it may be far outside the range. See extreme value theory for further discussion. Formally, this applies not just to sampling from a population, but to any exchangeable sequence of random variables, not necessarily independent or identically distributed.
Contrast with other intervals
Contrast with confidence intervals
Note that in the formula for the predictive confidence interval no mention is made of the unobservable parameters μ and σ of population mean and standard deviation – the observed sample statistics <math>\overline{X}_n</math> and <math>S_n</math> of sample mean and standard deviation are used, and what is estimated is the outcome of future samples.
Rather than using sample statistics as estimators of population parameters and applying confidence intervals to these estimates, one considers "the next sample" <math>X_{n+1}</math> as itself a statistic, and computes its sampling distribution.
In parameter confidence intervals, one estimates population parameters; if one wishes to interpret this as prediction of the next sample, one models "the next sample" as a draw from this estimated population, using the (estimated) population distribution. By contrast, in predictive confidence intervals, one uses the sampling distribution of (a statistic of) n or n+1 samples from such a population, and the population distribution is not directly used, though the assumption about its form (though not the values of its parameters) is used in computing the sampling distribution.
Contrast with tolerance intervals
This article should include a summary of Tolerance interval. See Wikipedia:Summary style for information on how to incorporate it into this article's main text. (February 2013) |
Applications
Prediction intervals are commonly used as definitions of reference ranges, such as reference ranges for blood tests to give an idea of whether a blood test is normal or not. For this purpose, the most commonly used prediction interval is the 95% prediction interval, and a reference range based on it can be called a standard reference range.
Regression analysis
It has been suggested that Mean and predicted response be merged into this article. (Discuss) Proposed since September 2014. |
A common application of prediction intervals is to regression analysis.
Suppose the data is being modeled by a straight line regression:
- <math>y_i=\alpha+\beta x_i +\epsilon_i\,</math>
where <math>y_i</math> is the response variable, <math>x_i</math> is the explanatory variable, ε_{i} is a random error term, and <math>\alpha</math> and <math>\beta</math> are parameters.
Given estimates <math>\hat \alpha</math> and <math>\hat \beta</math> for the parameters, such as from a simple linear regression, the predicted response value y_{d} for a given explanatory value x_{d} is
- <math>\hat{y}_d=\hat\alpha+\hat\beta x_d ,</math>
(the point on the regression line), while the actual response would be
- <math>y_d=\alpha+\beta x_d +\epsilon_d. \,</math>
The point estimate <math>\hat{y}_d</math> is called the mean response, and is an estimate of the expected value of y_{d}, <math>E(y|x_d).</math>
A prediction interval instead gives an interval in which one expects y_{d} to fall; this is not necessary if the actual parameters α and β are known (together with the error term ε_{i}), but if one is estimating from a sample, then one may use the standard error of the estimates for the intercept and slope (<math>\hat\alpha</math> and <math>\hat\beta</math>), as well as their correlation, to compute a prediction interval.
In regression, Faraway (2002, p. 39) makes a distinction between intervals for predictions of the mean response vs. for predictions of observed response—affecting essentially the inclusion or not of the unity term within the square root in the expansion factors above; see ^{[9]} for details.
Bayesian statistics
Seymour Geisser, a proponent of predictive inference, gives predictive applications of Bayesian statistics.^{[10]}
In Bayesian statistics, one can compute (Bayesian) prediction intervals from the posterior probability of the random variable, as a credible interval. In theoretical work, credible intervals are not often calculated for the prediction of future events, but for inference of parameters – i.e., credible intervals of a parameter, not for the outcomes of the variable itself. However, particularly where applications are concerned with possible extreme values of yet to be observed cases, credible intervals for such values can be of practical importance.
See also
Further reading
- "Confidence intervals for predictions", chap. 3.5 in ^{[9]}
- Chatfield, C. (1993). "Calculating Interval Forecasts". Journal of Business and Economic Statistics 11 (2): 121–135. doi:10.2307/1391361.
- Geisser, Seymour (1993). Predictive Inference: An Introduction. CRC Press. p. 280. ISBN 0-412-03471-9
- Meade, N.; Islam, T. (1995). "Prediction Intervals for Growth Curve Forecasts". Journal of Forecasting 14 (5): 413–430. doi:10.1002/for.3980140502.
- Lawless, J.F.; Fredette, M. (2005). "Frequentist prediction intervals and predictive distributions". Biometrika 92 (3): 529–542. doi:10.1093/biomet/92.3.529.
- ISO 16269-8 Standard Interpretation of Data, Part 8, Determination of Prediction Intervals
References
- ^ Armstrong, J. Scott; Collopy, Fred (2001). "Identification of Asymmetric Prediction Intervals through Causal Forces" (PDF). Journal of Forecasting 20: 273–283. doi:10.1002/for.794.
- ^ (Geisser 1993, 2.1.1 Confidence regions for future realizations: Parametric case, p. 6–)
- ^ (Geisser 1993, p. 7)
- ^ ^{a} ^{b} ^{c} ^{d} Page 472 (Table A2) in: Sterne, Jonathan; Kirkwood, Betty R. (2003). Essential medical statistics. Oxford: Blackwell Science. p. 472. ISBN 0-86542-871-9.
- ^ (Geisser 1993, p. 8–9)
- ^ (Geisser 1993, p. 7–)
- ^ (Geisser 1993, Example 2.2, p. 9–10)
- ^ Prediction Intervals, Statistics @ SUNY Oswego
- ^ ^{a} ^{b} J. J. Faraway, "Practical Regression and Anova using R"
- ^ (Geisser 1993)