Why does a regression prediction interval widen as the predictor moves away from its sample mean?
answer
- the line pivots at the centre
- distance from the predictor mean matters
- squared distance appears in the formula
- long lever arm amplifies slope error
- bow tie, not a parallel strip
basics
~20 sThe fitted line is pinned most tightly at the centre of the data. The interval carries a leverage term growing with squared distance from the predictor's mean, so the band is a bow tie: narrowest at the mean, flaring at both ends.
solid answer
~50 sLeast squares makes the fitted line pass through the point `(xbar, ybar)`, so uncertainty in the estimated slope acts like a pivot about that centre. A small error in the slope barely moves the line near `xbar`, but is multiplied by the lever arm `(x0 - xbar)` further out. That is exactly the `(x0 - xbar)^2 / Sxx` term inside both interval formulas, where `Sxx` is the sum of squared deviations of the observed predictor values. The result is the classic bow-tie or hourglass band: narrowest at `xbar`, symmetric, flaring toward the edges of the observed range. One nuance worth stating: the flare is dramatic for the mean-response band but visually mild for the prediction interval, because the prediction interval has an extra `1` under the square root that dominates the leverage term, so it looks nearly parallel to the line.
go deeper
Recall the shape and the reason in plain words: the band is narrowest in the middle of the data and gets wider toward the edges, because the line is best pinned down where most of the data sits.
Be able to name the (x0 - xbar)^2 / Sxx term, say it is zero at the predictor mean and grows with the squared distance, and connect it to slope uncertainty pivoting about the centre of the data.
Demonstrate you will not misread the shape as a variance problem, and explain why the prediction band looks flat while the mean band flares. Mention that collecting data where predictions matter is what actually tightens the band.
Own the design implication: where the team invests in collecting observations determines where the model can be trusted. Be ready to argue for gathering data at the operating points that matter rather than only where volume happens to be.
## The pivot at the centre of the data Ordinary least squares with an intercept always produces a line through the point `(xbar, ybar)`, the mean of the predictor and the mean of the response. That is a mechanical consequence of the fit, not a coincidence: the intercept is chosen as `b0 = ybar - b1 * xbar`. So picture the plausible fitted lines you might have obtained from a different sample. They all pass near `(xbar, ybar)`, but they differ in slope. Near the centre they are bunched together. Far from the centre, a small difference in slope has been multiplied by a long lever arm, and the lines fan out. That picture is the interval band. Where the plausible lines are bunched, the interval is narrow. Where they fan out, it is wide. ## The term that does the work Both regression intervals at a predictor value `x0` contain the same leverage term: `(x0 - xbar)^2 / Sxx` where `Sxx = sum over i of (xi - xbar)^2` - The numerator is the squared distance from `x0` to the centre of the observed predictor values. It is zero at `xbar` and grows quadratically in both directions. - The denominator measures how spread out the observed predictor values are. It does not depend on `x0`; it just sets the scale. So the two interval half-widths are: - Mean response: `t * s * sqrt( 1/n + (x0 - xbar)^2 / Sxx )` - New case: `t * s * sqrt( 1 + 1/n + (x0 - xbar)^2 / Sxx )` At `x0 = xbar` the leverage term vanishes and the mean-response half-width is just `t * s * sqrt(1/n)` — the narrowest point of the band. Move away and it grows. ## Why the two bands look different on the same plot This catches people out. Suppose `1/n = 0.01` and at the edge of the data the leverage term reaches `0.04`. - The mean-response half-width goes from `t * s * sqrt(0.01) = 0.10 * t * s` at the centre to `t * s * sqrt(0.05) = 0.22 * t * s` at the edge. That is more than double: a visibly flared bow tie. - The prediction half-width goes from `t * s * sqrt(1.01) = 1.005 * t * s` to `t * s * sqrt(1.05) = 1.025 * t * s`. That is a 2% change: a band that looks essentially parallel to the fitted line. The leverage term is the same in both. It simply competes against a `1` in the prediction interval and against `1/n` in the mean-response interval. So the honest sentence is: the bow tie is a property of the estimated line, and it is loud in the mean-response band and quiet inside the prediction band, though it is present in both. ## What the shape is not Three confusions are worth naming. - **It is not heteroskedasticity.** A flaring interval band is what a correctly specified, constant-variance model looks like. Non-constant error variance is something you diagnose from the residual scatter, not from the shape of the band. A candidate who reads the bow tie as evidence of unequal variance has the diagnosis backwards. - **It is not caused by outliers at the ends.** Individual unusual points influence the *fit*; the flare is a property of the interval formula that is there even with perfectly behaved data. - **It is not a warning about extrapolation being safe.** Beyond the observed range the band keeps widening, but only quadratically and only under the assumption that the straight line is still the right model out there. The flare prices sampling error, not the risk of the wrong functional form. ## What you can actually do about a wide band The leverage term shrinks when `Sxx` is large — that is, when the observed predictor values are well spread out — and when the point you care about is near the centre of that spread. If you know in advance that predictions matter most at one end of the range, collecting observations out there is what tightens the band. In multiple regression the same idea generalises to a leverage value per row, largest for rows whose predictor combination is unusual relative to the rest of the data, and it drives the same widening. ## Saying it in an interview A compact answer: least squares pins the line at the mean of the predictor, so slope uncertainty pivots about that point; the interval carries a `(x0 - xbar)^2 / Sxx` term that is zero at the centre and grows quadratically outward, producing a bow-tie band. Add the nuance that the flare is much more visible on the mean-response band than on the prediction band, and you have answered a level above the question.
- At which predictor value is the mean-response band narrowest, and how narrow is it there?At `xbar`, the mean of the observed predictor values. There the leverage term is zero, so the half-width reduces to `t * s * sqrt(1/n)`. That is the tightest the band ever gets, and it is the reason predictions near the centre of the data are the ones you can defend most strongly.
- On the same plot, why does the prediction band look almost parallel while the mean band clearly flares?Both carry the same `(x0 - xbar)^2 / Sxx` term, but the prediction interval also carries a leading `1` under the square root. The leverage term is a small addition to `1` and a large addition to `1/n`, so the same curvature is visually swamped in one band and obvious in the other.
- Does a flaring band mean the error variance is larger at extreme predictor values?No. The band flares even when the error variance is perfectly constant, because it reflects uncertainty in the estimated line rather than the spread of the errors. Non-constant error variance is diagnosed from residual scatter against fitted values, and it would distort the band's width in a way the formula does not model.
Think of a seesaw pinned at the middle of your data. A tiny wobble in the tilt hardly moves the plank near the pivot, but the ends swing a long way.
saying these in an interview costs you the question
- Describes the interval band as a constant-width strip
- Reads the flare as evidence of non-constant error variance
- Blames outliers at the ends for the widening
- Cannot say where along the axis the band is narrowest
- Thinks the flare makes extrapolation safe