# Why are the ends of the prediction interval wider in the regression? [duplicate]

Usually, the prediction interval has this shape in the image.

I don't know why the end of the interval is wider than the center.

• It's because you have no information about the variance of values greater than $20$ and smaller than $0$. – Joshua Jun 21 '20 at 23:02
• I posted an image as an example. But in the other occasion, even when data are plenty around (for example) -40 and 60, the ends of the shape are still wider. Can you tell me more specific, please? – Hello_World Jun 21 '20 at 23:06
• Maybe there are less observations or more scattered observations in areas where the interval becomes wider? – Joshua Jun 21 '20 at 23:12
• There are math answers. But the intuitive answer is this. Take that graph and, understanding that you may be erroneous in estimating both the slope and the average value at the center, draw a bunch of lines that fall within the realm of those possibilities. What does that bundle of lines look like? – Russ Lenth Jun 22 '20 at 2:02

When performing a linear regression, there are 2 types of uncertainty in the prediction.

First is the prediction of the overall mean of the estimate (ie the center of the fit). The second is the uncertainly in the estimate calculating the slope.
Thus when you combine both uncertainties of the prediction there is a spread between the high and low estimates. Then as further away from the center, uncertainty of the slope becomes a large and more noticeable factor, thus the limits widen.

• +1. In addition, there is (an estimate of) residual variance. – Stephan Kolassa Jun 22 '20 at 10:34

Its very easy to determine the prediction interval for the data.

$$\operatorname{Var}(y) = \operatorname{Var}(\beta_0 + \beta_1 x) + \operatorname{Var}(\varepsilon) = \sigma^2_{\beta_0} + \sigma^2_{\beta_1}x^2 + 2x \operatorname{Cov}(\beta_0, \beta_1)+ \sigma^2_{\epsilon}$$

As you can see, this is a quadratic function in x, which means for larger values of $$x$$ (well...larger as compared to the sample mean of $$x$$), the variance of the prediction will be larger.

This reference, for example, clearly gives the formula of a prediction interval for a simple linear regression model, which contains the expression:

$$\sqrt{({1/n + (x_p - x_m)^2}/{(n-1){s_x}^2}}$$

So, as the prediction for the explanatory variable $$x_p$$ becomes more removed from its mean $$x_m$$, the interval widens.

In practice, I would be cautious about applying the prediction interval far from the mean, particularly a point estimate not included in the observed range of the data, as the structural equation itself may no longer be accurate/valid.