A prediction interval is a pair of statistics such that, for every and , an independent future response at the specified input satisfies
In the normal linear model, assume has full column rank and write
For a new observation
independent of the training sample, the prediction error is
The two terms on the right are independent centered normal random variables, while
Consequently, with the new-point regression leverage
we have
The assumption in the question gives
This variable is independent of ; it is also independent of the new error . Therefore it is independent of the standardized prediction error, and the defining normal-over-chi-square representation of Student's t-distribution gives
If is the corresponding upper quantile, symmetry yields
Solving these inequalities for proves that the prediction interval in a normal linear model is
Its center and endpoints depend only on the observed data and , and the pivotal calculation proves the required coverage uniformly in the unknown and .
For the normal linear model, the Gaussian likelihood gives
Maximization over gives the ordinary least squares estimator , and maximization over the variance gives
At this value the quadratic term in is . There are regression coefficients and one variance parameter, so substitution into the Akaike information criterion yields
For the normal linear model, the maximum-likelihood estimators are
and
The divisor is for maximum likelihood, rather than the degrees-of-freedom divisor used by the unbiased residual-variance estimator.
Writing , , and , the fitted normal linear model is
The R formula lstat * age includes both main effects and their interaction term.
Three notable features are:
  • The fitted model is highly significant overall: its statistic is on degrees of freedom with . Its , however, means that about of the observed response variation remains unexplained, and the residual standard deviation is about house-value units.
  • At fixed age, the fitted slope with respect to lstat is
    The large negative main coefficient is strongly significant. The positive interaction is significant at the level (), indicating that this negative association becomes slightly weaker for older housing tracts.
  • The age main-effect estimate is essentially zero with , but it is the age effect specifically at and should not be interpreted separately from the significant interaction. The diagnostic plots also show curved residual structure, increasing spread, a heavy upper tail with observations 215, 372, and 373, and substantial influence from observation 215. These features cast doubt on linearity, constant variance, and Gaussian residual assumptions.
Let be record time and let contain standardized climb and distance. Model 1 is the normal linear model
Model 2 applies the same model after a logarithmic transformation:
so is conditionally log-normal. Model 3 is a Gamma regression with logarithmic link:
The other quantitative columns are mpg, psngr, length, width, and weight, so use
fit2 <- lm(log(price) ~ mpg + psngr + length + width + weight, data = cars)
This is a normal linear model with an intercept and five slopes.
The fitted normal linear model is
for .
The normal linear model is with . Full column rank gives
With hat matrix , the th regression leverage is . Since and is an orthogonal projection,
High-leverage observations can move their own fitted values strongly and may exert disproportionate influence; residual size alone can therefore conceal them.
Prediction interval for a ratio of log-normal responses Created 2026-09-29 Updated 2026-10-03
Suppose independent future log responses satisfy , where the errors have variance . Conditional on a fitted normal linear model, the predicted log ratio has estimated mean and estimated variance
A Student t interval on this logarithmic scale can be exponentiated to obtain a prediction interval for the positive ratio.
For the full-rank normal linear model and an independent future response , put
Then an exact prediction interval is
The additional one inside the square root is the future observation's irreducible error variance; a confidence interval for its mean omits it.
Predictor centering 2026-10-07
Replacing a numerical predictor by preserves the fitted mean space and slope in a linear regression containing an intercept. The intercept becomes the fitted mean at . In simple linear regression, centering at the sample mean makes intercept and slope estimates uncorrelated under a normal linear model. This changes coefficient interpretation, not predictions.
In a fixed full-rank normal linear model, the studentized estimator of one coefficient has a noncentral t-distribution with noncentrality equal to that coefficient divided by its standard deviation. The fitted and residual orthogonal projections of the Gaussian noise are independent. Therefore the statistical power of its exact Student's t-test does not depend on the other regression coefficients, with design and variance fixed.
For a fixed residual direction obtained by Square-root Lasso, its optimality condition gives . In a fixed-design normal linear model, the score equals a component plus a remainder bounded by . The direction must be fixed or independent of the response noise for that normality claim.
Residual standard error 2026-10-06
In a full-rank normal linear model with observations and mean coefficients, the residual standard error estimates the common error standard deviation. Its square is the unbiased estimator ; the square root itself is not generally unbiased. It measures unexplained response variation, whereas a regression coefficient's standard error measures uncertainty in that coefficient.
Standardized regression residual Created 2026-10-05 Updated 2026-10-06
In a normal linear model, the th regression residual has variance , where is a diagonal entry of the hat matrix. Replacing by the residual standard deviation gives the standardized residual used in the normal Q-Q plot of R's linear-model diagnostic plots.
The number of free dimensions remaining after specified constraints often determines a reference sampling distribution. In a full-rank normal linear model with observations and mean coefficients, the residual space has dimension . A regular nested likelihood-ratio test instead uses the difference in free statistical parameter dimensions. Boundary constraints may invalidate this regular calibration.
A two-factor normal linear model describes independent responses with factor-specific means and common normal error variance. The additive mean assumes no interaction term; the full mean permits the first factor effect to vary with the second. Constraints or treatment coding identify the parameters. In a balanced two-by-five design the full model has ten free cell means.