Regression Inference
Regression inference is the body of statistical methods used to draw conclusions about population regression parameters (slopes, intercepts, and predicted means) from a sample of data. Its key result: under the standard linear model assumptions, the least-squares estimators are normally distributed (or approximately so), enabling confidence intervals, hypothesis tests, and prediction intervals for the unknown true relationship. It applies wherever one models how a response variable depends on one or more predictors. Developed by Galton, Pearson, Fisher, Gauss, and others from the 1800s through the 20th century.
The estimated coefficients are statistics computed from random data, so they have sampling distributions. Once we know the mean and variance (and shape) of those distributions, every inferential question—Is the slope nonzero? What range plausibly contains it? What range will a future observation fall in?—becomes an exercise in standardizing to a or variable. Inference is the bridge from one observed line to a statement about the whole family of lines that could have produced the data.
Formal Statement
We assume the data , , are generated by
Derivation hint: this is an assumption (the model), not a derivation; the are treated as fixed/known constants and all randomness enters through . Symbols:
- — the random response for observation .
- — the (fixed) predictor value.
- — true intercept (population mean of when ).
- — true slope (change in mean per unit ).
- — random error; assumed independent, mean zero, constant variance , normally distributed.
- — common error variance (usually unknown, estimated).
The assumptions (mnemonic LINE): Linearity of the mean, Independence of errors, Normality of errors, Equal variance (homoscedasticity).
The estimators minimizing are
Derivation hint: set the two partial derivatives of the sum of squared residuals with respect to and to zero (the normal equations) and solve the resulting linear system. Here and .
Under model [1], the slope estimator satisfies
Derivation hint: write with weights ; then is a linear combination of independent normals, so it is normal with mean and variance . Because is unknown, we estimate it by the mean squared error
Derivation hint: dividing by (degrees of freedom = sample size minus the two estimated parameters) makes unbiased for ; the loss of two df comes from estimating and . and the resulting standardized slope follows a distribution:
Derivation hint: a standard normal (from [3]) divided by yields a ; here and is independent of (Cochran's theorem).
Among all linear unbiased estimators of and , the least-squares estimators have the smallest variance. They are the Best Linear Unbiased Estimators (BLUE). This requires only mean-zero, uncorrelated, equal-variance errors—normality is not needed for Gauss–Markov, only for the exact distribution.
Why It Holds / Derivation
Step 1. From [3], — exact normality of the standardized slope.
Step 2. From [4], , independent of .
Step 3. The ratio of Step 1's normal to cancels the unknown and gives the pivot [5]: .
Step 4. A pivot has a distribution free of unknown parameters, so for ,
Step 5. Solve the inequality for to obtain the interval
Derivation hint: algebraically isolate inside the probability statement; the random endpoints define a confidence interval.
Step 6. To test (no linear relationship), set in [5] and compute the test statistic
Derivation hint: under the numerator of the pivot becomes ; compare to the distribution to obtain a p-value. rejecting when exceeds the critical value.
∎For a target predictor value , the fitted value is , with
Derivation hint: write as a linear combination of the , or propagate variances of and accounting for their covariance; the term grows quadratically as departs from . A confidence interval for the mean response uses [8]. A prediction interval for a new individual observation adds the irreducible error :
Derivation hint: the new observation contributes its own independent error with variance , added to the estimation variance from [8]. Replacing by and using gives the intervals
Derivation hint: substitute for in [8] and [9], take square roots for standard errors, and form the usual -based interval.
Fisher gave regression inference its modern rigor. He clarified degrees of freedom, developed the analysis of variance that underlies the regression -test, derived exact small-sample distributions building on Gosset's , and championed maximum likelihood and significance testing. The decomposition of total variation into explained and residual sums of squares—and its interpretation through and statistics—is largely his legacy, refined at Rothamsted Experimental Station in the 1920s.
Building Intuition
Picture drawing your sample over and over. Each sample yields a slightly different best-fit line, pivoting around the center of mass . The spread of those slopes is the standard error. Equation [3] says this spread shrinks when (a) the noise is small, (b) the sample is large, or (c) the -values are widely spread out (large )—a long lever arm makes the slope easy to pin down. The confidence and prediction bands flare outward at the extremes of (the term in [8]–[10]) because a small wobble in the slope swings the line most where it is farthest from the pivot. Finally, the prediction band is always wider than the confidence band because predicting one noisy individual is harder than estimating an average.
Worked Examples
Given: observations. Computed quantities: , , , , and residual sum of squares .
Step 1 — Slope: .
Step 2 — Intercept: .
Step 3 — Error variance: , so .
Step 4 — Standard error of slope: .
Step 5 — Test : on df. Since , we reject (p ).
Step 6 — 95% CI for slope: .
Given: Same fit as above (, , , , , ). Predict at .
Step 1 — Point estimate: .
Step 2 — Leverage term: .
Step 3 — Mean-response SE: . With : margin .
Step 4 — 95% CI for mean response: .
Step 5 — Prediction SE: ; margin .
Step 6 — 95% prediction interval: .
The prediction interval is far wider, reflecting the extra of an individual outcome.
Common Misconceptions
A confidence interval is not a prediction interval. The CI in [10] (left) covers the average at ; the PI (right) covers a single future . Reporting the narrow CI when you mean to predict an individual outcome dramatically overstates precision.
A high does not validate inference. measures variance explained, not whether the LINE assumptions hold or whether is significant. You can have a tiny with a highly significant slope (large ) or a large with badly nonlinear residuals.
"Fail to reject" "the slope is zero." A non-significant means insufficient evidence, not proof of no effect—especially with small or small , where the SE is large.
Extrapolation invalidates the intervals. Equations [8]–[10] are valid only over the observed range of ; outside it, the linearity assumption is untested and the flaring bands become meaninglessly wide and unreliable.
Suppose truly depends on quadratically, , but we fit a straight line over . The fitted slope is highly significant () and the -test "confirms a relationship." Yet the inference about is about a misspecified model: the residuals show a clear U-shape, violating linearity and independence-of-trend. The valid-looking p-value is computed under assumptions that are false, so the standard errors—and hence the entire inference—are not trustworthy. Always inspect residual plots before believing a regression p-value.
Connections
Regression inference sits at the meeting point of several pillars. The pivot in [5] is the same machinery as Student's t-Distribution inference for a mean; in fact testing a single slope is a special case of the general Hypothesis Testing framework. The variance decomposition behind the overall fit () connects directly to Analysis of Variance and the -test, which for one predictor satisfies . Multiple predictors generalize everything through Ordinary Least Squares in matrix form, , with covariance . The estimator-optimality result is the Gauss-Markov Theorem, while the route to exact distributions when errors are normal is Maximum Likelihood Estimation (least squares = MLE under normal errors). The correlation coefficient and link to Pearson Correlation.
Real-World Applications
Historical Development
Subtleties & Limits
Classical regression inference rests on assumptions that real data routinely break, and handling these robustly remains an active concern:
- Heteroscedasticity and autocorrelation. When varies or errors are correlated (time series), the SEs in [3]–[10] are wrong. White's heteroscedasticity-consistent ("sandwich") estimators and Newey–West corrections patch this, but choosing among them and ensuring valid coverage in finite samples is non-trivial.
- Errors-in-variables. If is itself measured with noise, is biased toward zero (attenuation); the standard inference is invalid and identification requires instrumental variables or structural assumptions.
- Selective inference / data snooping. Building a model from the data and then testing on the same data invalidates p-values. Post-selection inference (e.g., the work of Berk, Lockhart, Taylor, Tibshirani on selective inference and the LASSO) seeks valid intervals after model selection—an area still developing.
- Non-normal, heavy-tailed errors. The pivot is exact only under normality; the central limit theorem rescues large-sample inference, but small samples with outliers can mislead, motivating robust/quantile regression.
- Causal interpretation. A precise CI for says nothing about causation absent randomization or a credible identification strategy—confounding remains the deepest practical limit.
See Also
Ordinary Least Squares · Gauss-Markov Theorem · Analysis of Variance · Pearson Correlation · Student's t-Distribution · Multiple Linear Regression · Maximum Likelihood Estimation · Hypothesis Testing