Explanation

From one predictor to many

Multiple regression models a numerical response y using k explanatory variables x₁, …, x_k:

ŷ = b₀ + b₁x₁ + b₂x₂ + … + b_k x_k.

Using several predictors usually explains more variation than one and allows you to control for other factors. The population model is y = β₀ + β₁x₁ + … + β_k x_k + ε, where ε is a random error with mean 0. As in simple regression, the coefficients are found by least squares, which minimizes the sum of squared residuals; software does the calculation. Each slope bᵢ is interpreted as the expected change in y for a one-unit increase in xᵢ while all other predictors are held constant. The value b₀ is the predicted y when all x's equal 0, which may lack meaning.

Conditions

They extend the simple regression ones: a linear relationship between y and each x (additive effects), independent errors, approximately normal errors with constant variance, and a random sample. Residual plots check them. Quantitative predictors are typical; categorical predictors need indicator (dummy, 0/1) variables.

Partitioning variation

The total variation is split into explained and unexplained parts:

  • SST = Σ(y − ȳ)², total sum of squares, df = n − 1.
  • SSR = Σ(ŷ − ȳ)², regression sum of squares, df = k.
  • SSE = Σ(y − ŷ)², error (residual) sum of squares, df = n − k − 1.
  • SST = SSR + SSE.

Dividing by the degrees of freedom gives mean squares: MSR = SSR/k and MSE = SSE/(n − k − 1).

Standard error of the estimate

s = √MSE = √(SSE/(n − k − 1)) estimates the standard deviation of the errors, the typical distance of observed y-values from the fitted values, in units of y. The denominator n − k − 1 accounts for the k + 1 coefficients estimated. About 95% of observations lie within roughly 2s of the fitted surface if errors are normal.

Coefficient of multiple determination

R² = SSR/SST is the proportion of the variation in y explained by the whole set of predictors together (0 ≤ R² ≤ 1). It never decreases when a predictor is added, even a useless one, so it can overstate fit. Adjusted R² = 1 − (1 − R²)(n − 1)/(n − k − 1) penalises extra predictors and can fall when a new variable adds little; compare models with adjusted R².

Testing the significance of the overall model

The F test for overall significance asks whether the model as a whole is useful.

  • H₀: β₁ = β₂ = … = β_k = 0 (no predictor has a linear effect). Hₐ: at least one βᵢ ≠ 0.
  • F = MSR/MSE with df = (k, n − k − 1), right-tailed.
  • A large F (small p-value) means the model explains significantly more than chance. It does not say which predictors matter or that the model is the best one.
  • F is related to R²: F = (R²/k)/((1 − R²)/(n − k − 1)).

Reading regression output

Software tables list, for each predictor, the coefficient, its standard error, a t statistic, and a p-value (Week 15), followed by an ANOVA table with SSR, SSE, MSR, MSE, F, and its p-value, plus R², adjusted R², and s. The overall F appears in the ANOVA table, not among the individual rows.

Common mistakes

Reading R² as proof the model is correct; adding variables only to raise R²; forgetting "holding the others constant" in coefficient interpretation; using n − k instead of n − k − 1 as the error df; concluding all predictors are significant from a significant overall F.

Practice tasks

  1. In a model with n = 25 and k = 3 predictors, what are the df for the F test?
  2. ŷ = 10 + 2x₁ − 3x₂ + 0.5x₃. Predict y when x₁ = 5, x₂ = 2, x₃ = 4.
  3. Interpret the coefficient −3 on x₂ in task 2.
  4. SSR = 80 and SSE = 20. Find SST and R².
  5. With n = 25 and k = 3 for task 4, find adjusted R².
  6. Compute MSR, MSE, F, and s for tasks 4–5. Compare with the critical F(3, 21) = 3.07.
  7. A new, irrelevant variable is added. What happens to R² and adjusted R² (typically)? Why is that useful?