# Prediction Interval Calculator for a Regression Prediction

**
Instructions:
**
Use this prediction interval calculator for the mean response of a regression prediction. Please input the data for the independent variable \((X)\) and the dependent variable (\(Y\)), the confidence level and the X-value for the prediction, in the form below:

## Prediction Interval for the Mean Response

The Prediction Interval for an individual predictions corresponds to the calculated confidence interval for the individual predicted response \(\hat{Y}_0\) for a given value \(X = X_0\).

First, we need to know the mean squared error:

\[\hat{\sigma}^2 = \displaystyle \frac{SSE}{n-2}\]## How do you calculate prediction interval?

Then, the \(1-\alpha)\times 100 \)% confidence interval for the the individual prediction \(\hat{Y}_0\) is

\[CI = \displaystyle \left( \hat{Y}_0 - t_{\alpha/2; n-2} \sqrt{ \hat{\sigma}^2 \left(1 + \frac{1}{n} + \frac{\left(X_0 - \bar X\right)^2}{SS_{XX}}\right) },\hat{Y}_0 + t_{\alpha/2; n-2} \sqrt{ \hat{\sigma}^2 \left(1+ \frac{1}{n} + \frac{\left(X_0 - \bar X\right)^2}{SS_{XX}}\right) } \right)\]## Prediction Interval Interpretation

For example, what is the meaning of 80% prediction interval we have found? Say that we have found that the 80% predicted interval for Y for X = 3 is (65.6, 78.9). This indicate that we are 80% confident that a future prediction will be contained by (65.6, 78.9).

### How do you calculate 95 prediction interval in Excel?

Excel does not directly compute prediction intervals. One reason for this is that a prediction interval depends on the standard error of the prediction, which depends on the actual value of X used for the prediction.

Then, if you want to use Excel, you will need to use the actual formula to compute the prediction interval limits. Notice that you will need SSXX, which is not directly provided by Excel, and you will need to compute yourself.

### Other useful regression calculators

If you are interested rather in a confidence interval for the mean response, please use instead this confidence interval calculator for regression predictions .