Find a course

Module 4: Multiple RegressionLesson 8 of 1214 min

Multiple Regression: Holding Other Things Constant

Fit models with several predictors, interpret each coefficient holding the others constant, understand omitted variable bias and use adjusted R-squared.

Step 1 of 13Learn

Why do bigger houses with more bedrooms sell for less?

An analyst fits two regressions on the same 500 home sales. With bedrooms as the only predictor, each extra bedroom is associated with a price $45,000 higher. Then she adds floor area to the model:

predicted price = 20,000 + 140 × sqft − 6,000 × bedrooms

Now the coefficient on bedrooms is negative. Did adding a variable break the model?

No. The two coefficients answer different questions. In the first model, the bedroom coefficient compares homes with more bedrooms to homes with fewer, and homes with more bedrooms are usually much bigger. Most of that $45,000 is really about size. In the second model, the bedroom coefficient compares homes with the same floor area that differ in the number of bedrooms. Splitting a fixed area into more, smaller rooms is associated with a slightly lower price.

This is the power of multiple regression: it estimates the association of each predictor with the response while holding the other predictors constant. That lets you separate overlapping influences, control for confounders and make better predictions by combining information.

It also means coefficients can change, even flip sign, when you add or remove variables. Understanding why is the key to interpreting multiple regression correctly, and that is what this lesson is about.

Step 2 of 13Practice · Chart

The bedroom coefficient in two models

Tap the model that compares homes of the same size.

Tap the bar that answers the question, then press Check.

The bedroom coefficient in two modelsBar chart with 2 categories: Bedrooms only: $45,000; Bedrooms + floor area: -$6,000.-$20k$0$20k$40k$60kBedrooms onlyBedrooms + floor area$45,000-$6,000
From the example above: same 500 sales, different comparisons.
The bedroom coefficient in two models
ItemCoefficient on bedrooms
Bedrooms only$45,000
Bedrooms + floor area-$6,000

Step 3 of 13Learn

The model and how to read its coefficients

A multiple regression with k predictors has the form

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

The coefficients are still chosen by least squares: they minimize the sum of squared residuals, now with a flat surface (for two predictors) or a higher-dimensional plane instead of a line.

Interpreting a coefficient: b₁ is the change in predicted y for a one-unit increase in x₁, holding all other predictors in the model constant. For the house model:

  • Among homes with the same number of bedrooms, each additional square foot is associated with a predicted price $140 higher.
  • Among homes with the same floor area, each additional bedroom is associated with a predicted price $6,000 lower.

The intercept is the predicted y when every predictor equals zero, which here is meaningless (a 0-square-foot, 0-bedroom house).

The phrase "holding constant" is a statistical adjustment, not a physical experiment. It means comparing observations that are similar on the other predictors, as estimated by the model. It only adjusts for variables that are in the model, and it assumes the relationships are roughly linear and additive. The same causal caution applies as in simple regression: in observational data, these are adjusted associations, not proven effects.

Step 4 of 13Practice · Choose one

A model predicts monthly salary from years of experience and years of education: ŷ = 1,200 + 85 × experience + 210 × education. How should the coefficient 85 be interpreted?

Step 5 of 13Practice · Work it out

Using predicted price = 20,000 + 140 × sqft − 6,000 × bedrooms, what is the predicted price in dollars of a 2,000-square-foot house with 3 bedrooms?

Step 6 of 13Learn

Omitted variable bias: why coefficients change

When a model leaves out a variable that affects y and is correlated with an included predictor, the included predictor's coefficient absorbs part of the missing variable's effect. This is omitted variable bias.

The bedroom example shows it. Floor area raises price and is strongly correlated with bedrooms. Leave floor area out, and the bedroom coefficient picks up the effect of size, becoming large and positive. Put floor area in, and the bedroom coefficient reflects only what bedrooms add beyond size.

The direction of the bias follows a simple rule. If the omitted variable is positively related to y and positively correlated with the included predictor, the included coefficient is biased upward. If one of those relationships is negative, the bias is downward.

Example: a regression of salary on years of education, without a measure of family background, probably overstates the return to education, if family advantages raise both education and salary.

This is the same logic as confounding, now written in the language of coefficients. Adding a confounder to the model is one way to control for it. But omitted variable bias can never be fully ruled out with observational data: some relevant factors, like motivation or talent, are rarely measured. Interpret coefficients with that in mind, and think hard about what's missing before you trust a coefficient as an effect.

Step 7 of 13Practice · Diagram

How an omitted variable leaks into a coefficient

If floor area were unrelated to bedrooms, which link would break and remove the bias?

Tap the shape that answers the question, then press Check.

How an omitted variable leaks into a coefficientProcess diagram: Floor area left out → It moves with bedrooms → Bedrooms absorb its effect → Coefficient biased upward.Floor arealeft outIt moveswithbedroomsBedroomsabsorb itseffectCoefficientbiasedupward
Floor area left out

It affects price strongly.

It moves with bedrooms

More bedrooms usually means a bigger house.

Bedrooms absorb its effect

The bedroom coefficient picks up the price of size.

Coefficient biased upward

+$45,000 instead of −$6,000.

Step 8 of 13Learn

R² and adjusted R²

R² keeps its meaning in multiple regression: the share of variation in y explained by all the predictors together. But it has a flaw: R² never decreases when you add a predictor, even a useless one such as a column of random numbers, because least squares can always use an extra variable to fit the sample a tiny bit better.

So comparing models by R² rewards stuffing them with variables. Adjusted R² adds a penalty for the number of predictors:

adjusted R² = 1 − (1 − R²) × (n − 1) / (n − k − 1)

where n is the number of observations and k the number of predictors. Adding a predictor raises adjusted R² only if it improves the fit by more than chance would; adding junk lowers it.

Example: a model with 5 predictors and n = 50 has R² = 0.40. Then adjusted R² = 1 − 0.60 × 49 / 44 ≈ 0.33. With small samples and many predictors, the gap between R² and adjusted R² is large, a warning that the model may be fitting noise.

Most outputs also report an overall F-test, which tests whether the predictors together explain more than nothing, that is, whether all slopes are zero. A significant F with no individually significant coefficient is a classic sign of correlated predictors, discussed in the next lessons.

Step 9 of 13Try the calculator

Adjusted R²

See how the penalty grows as you add predictors or shrink the sample.

Adjusted R²
0.332
Penalty (R² − adjusted R²)
0.068

Step 10 of 13Practice · Work it out

A model with 4 predictors fit to 41 observations has R² = 0.50. What is its adjusted R²? Round to three decimal places.

Step 11 of 13Note

Step 12 of 13Practice · True or false

Adding a predictor to a regression model can make R² go down.

Step 13 of 13Practice · What would you do?

What would you do?

A study regresses students' test scores on hours of tutoring and finds a negative coefficient: more tutoring, lower scores. A teacher concludes that tutoring hurts. What is the most likely explanation, and how would you check it?