4.9.22 · D5Probability Theory & Statistics

Question bank — Linear regression — least squares, inference on coefficients

1,511 words7 min readBack to topic

True or false — justify

Least squares minimises the perpendicular distance from each point to the line.
False. It minimises the vertical miss squared. Perpendicular distance treats and symmetrically (that's total least squares / errors-in-variables), but ordinary regression assumes is fixed and only carries noise.
The fitted line always passes through the point .
True. The first normal equation divided by gives , so the centre of mass of the cloud is always on the line — the line pivots about it.
Swapping the roles of and gives you the same line drawn the other way.
False. Regressing on minimises horizontal misses and gives slope , not . The two lines differ unless the fit is perfect; both pass through but tilt differently.
If then and are independent.
False. A zero least-squares slope means zero linear co-movement (). A perfect U-shaped (quadratic) relation can have yet fully determines — strong dependence, no straight-line signal.
can be negative.
False for ordinary least squares with an intercept. Because and the fitted line can never do worse than the flat line , we always have . (A forced no-intercept or externally-imposed model can go negative, but that's outside the standard setup.)
Doubling every (same 's) leaves unchanged.
True. Rescaling multiplies by and by , so halves but the fitted values are identical — SSR, SSE, SST all unchanged, hence unchanged.
being unbiased means our particular estimate equals the true .
False. Unbiased means — the estimate is right on average across many samples. Any single estimate almost surely misses; the SE tells us by roughly how much.
The Gauss–Markov "best" property requires the errors to be Gaussian.
False. Gauss–Markov needs only zero-mean, constant-variance, uncorrelated errors to make least squares BLUE. Gaussianity is needed only for the t-distribution of the test statistic and exact confidence intervals.
For simple regression, equals the square of the correlation coefficient .
True. With one predictor, SSR/SST reduces algebraically to where — see Correlation coefficient. This fails once there is more than one predictor.
A wide confidence interval for means the true slope is large.
False. Width measures uncertainty, not magnitude. A wide CI (small , big noise, small ) means we simply can't pin the slope down — it could be small, large, or zero.

Spot the error

"We got , so the straight-line model is the correct model."
A high says a line explains most of the variance, not that the shape is right. Curved data can still yield high ; only a residual plot reveals the leftover pattern the line missed.
"To estimate , average the squared residuals: ."
Wrong divisor. The residuals obey two constraints (, ), leaving only free pieces of information, so dividing by underestimates . Use .
"The slope is significant, so the effect is important."
Significance (small SE relative to ) means the effect is precisely measured to be non-zero, not that it is large. A trivially small slope with huge can be significant yet practically meaningless.
" came out negative, so I flip its sign — a magnitude can't be negative."
The slope is a genuine signed quantity: negative means tends to fall as rises. Flipping it changes the model's meaning; it inherits its sign straight from .
"The 95% CI says 95% of future -values land in that range."
That's a parameter interval for , not a data interval. Ranges for individual future observations are (much wider) prediction intervals that add the of the noise on top of estimation uncertainty.
"Because the errors are uncorrelated, the estimates and are uncorrelated too."
They are generally correlated: their covariance is , zero only when . Uncorrelated errors do not imply uncorrelated coefficient estimates.
"I dropped the intercept to simplify — the line through the origin is basically the same."
Forcing no longer guarantees the line passes through , breaks the SST = SSR + SSE split, and can badly bias the slope if the true intercept is non-zero.

Why questions

Why do we square the residuals instead of taking absolute values?
Squaring is smooth and differentiable (so calculus gives a clean closed-form solution), punishes large misses more, and coincides with maximum likelihood under Gaussian noise. Absolute error also "shrinks misses" but has no tidy formula and a non-unique fit.
Why does more spread in make the slope more trustworthy?
, so large shrinks the variance. Geometrically, widely-spaced 's give the line a long lever arm — the same vertical noise tilts a long line far less than a short one.
Why divide by rather than as with an ordinary sample variance?
A sample variance estimates one quantity (the mean), losing one degree of freedom. Here we estimated two parameters, and , so two constraints are consumed and pieces of independent residual information remain.
Why does the SST = SSR + SSE decomposition have no cross term?
Because the residual vector is orthogonal to the fitted-values vector in -dimensional space (a consequence of the normal equations). It's a Pythagoras: the cross term vanishes exactly.
Why can't we just use directly for a test?
Because is unknown. Replacing it with the estimate injects extra randomness, which is precisely why the standardised statistic follows a t-distribution with df rather than a normal.
Why is a random variable at all, when the are treated as fixed numbers?
Because is a weighted sum of the noisy 's. Re-running the experiment redraws the errors , giving different and thus a different slope — that's the source of its sampling variability.
Why does the least-squares problem have a unique minimum?
is a convex (upward-opening) paraboloid in the two parameters, so its gradient vanishes at exactly one point — provided the are not all identical (i.e. ).

Edge cases

What happens to the slope if every is the same value?
, so is undefined (divide by zero). Geometrically all points sit on one vertical strip — no horizontal lever exists to determine a tilt.
With only data points, what are the fit and the residual variance?
The line passes exactly through both points (SSE, trivially), but is undefined — you cannot estimate noise with zero degrees of freedom left over.
If all points lie exactly on a straight line, what are and ?
gives and , so — the slope is estimated with zero uncertainty in-sample. Real data essentially never do this; it's a sign of overfit or a deterministic relation.
If the true slope is genuinely zero, does come out exactly zero?
No — noise still produces a small non-zero in any finite sample. The hypothesis test asks whether that wobble is larger than the SE would explain by chance alone.
As the sample size (with -spread growing), what happens to ?
It shrinks toward zero, because grows without bound while stays fixed. The slope estimate becomes arbitrarily precise — consistency of the least-squares estimator.
What does a single far-away outlier do to the least-squares line?
Because squaring gives huge weight to large vertical misses, one distant point can pivot the whole line toward itself, inflating SSE and distorting both and . Least squares is not robust to outliers.
If the -values are perfectly symmetric about zero (), how do and relate?
Their covariance becomes zero, so the intercept and slope estimates are uncorrelated — centring the predictor is a common trick to decouple them.