Multiple Regression
Info sheet · Statistics for Psychology & Neuroscience
Warning✎ Editing notes — to do / to check
Working notes for the author — not shown to students once collapsed; remove before publishing.
- [ ]
What you’ll get from this sheet
Regression with more than one predictor — and the crucial idea of what a coefficient means once other variables are in the model. By the end you should be able to:
- Read the multiple‑regression equation.
- Interpret a coefficient as an effect holding the other predictors constant.
Multiple regression adds predictors: \(Y = b_0 + b_1X_1 + b_2X_2 + \dots + \varepsilon\). Each coefficient is that predictor’s effect holding the others constant — its unique contribution, which can differ sharply from its effect considered alone when predictors are correlated.
More than one predictor
So far we’ve had one predictor \(X\) and one outcome \(Y\). But most outcomes depend on many things at once. Multiple regression extends OLS to two or more predictors, with the same structure:
\[Y = b_0 + b_1X_1 + b_2X_2 + \dots + b_kX_k + \varepsilon\]
where the \(b\)’s are the intercept and slopes and \(\varepsilon\) is the error. Geometrically, one predictor fits a line; two predictors fit a plane; more fit a hyperplane you can’t draw. Take London house prices predicted from square footage and number of bedrooms: lm(price ~ area + bedrooms).
The key phrase is in the interpretation: each coefficient is the effect of that predictor while holding the others constant. That’s what makes multiple regression more than a pile of simple regressions — and it’s why a predictor’s coefficient can change dramatically once you add a correlated variable alongside it.
“Holding constant”, made visible
Area and bedrooms are correlated (bigger homes have more bedrooms). Suppose the true driver of price is area, with bedrooms adding only a little. Slide the correlation between area and bedrooms and compare the bedrooms coefficient two ways: alone (price ~ bedrooms) versus controlling for area (price ~ area + bedrooms).
At zero correlation the two coefficients agree — with nothing shared, bedrooms means the same thing alone or alongside area. Raise the correlation and they split apart: on its own, bedrooms looks like a powerful predictor because it’s standing in for area; controlling for area, its unique effect shrinks back to the truth. The multiple‑regression coefficient asks a sharper question — what does bedrooms add once area is already accounted for?
See it in code
T = table(area, bedrooms, price);
fitlm(T, 'price ~ area + bedrooms') % each coefficient holds the other constantThe R and Python tabs run live; MATLAB is a static reference.
TipCheck your understanding
In price ~ area + bedrooms the bedrooms coefficient is about 5, but price ~ bedrooms alone gives 30. Why the difference?
Because area and bedrooms are correlated and area is the real driver of price. Considered alone, bedrooms soaks up area’s effect (they move together), so its slope is inflated. In the multiple regression, area is already in the model, so the bedrooms coefficient reflects only what bedrooms adds holding area constant — its unique contribution, ≈ 5. Same variable, different question.
A coefficient is “holding others constant” only for the variables actually in the model — leave out a confounder and the remaining coefficients quietly absorb its effect (omitted‑variable bias). When predictors are strongly correlated (multicollinearity) the individual coefficients become unstable and hard to interpret — worth checking with VIF (next sheet). And you can’t compare raw coefficient magnitudes across predictors measured on different scales; standardise them first if you want to rank importance.
Where this shows up next
Next: the assumptions these models rest on and how to check them, then how to choose which predictors to include. See Chapter (Correlation & Regression).