Skip to content
We use only essential cookies to keep you signed in and remember your preferences. See our Cookie Policy.
TestStop
MocksPracticeResourcesIndiaBlogPricing
Sign in
Resources › Econometrics › 1. Multiple regression
Econometrics · Lesson 1 of 18

Multiple regression: what holding other things constant means

Almost nothing in economics depends on one thing. Household spending depends on income, but also on how many people the household feeds and where it lives. A multiple regression puts all of them in at once and reports the effect of each with the others held fixed. This lesson says exactly what that phrase means, shows it on a picture you can change, and ends with the habit that matters most in an exam: reading a coefficient table and working out what happens when several variables change together.

← Econometrics moduleLesson 1 of 18 · about 55 minutes
1Multiple regression2Matrix form and Gauss-Markov3t and F tests4R² and adjusted R²5Dummies and interactions6Functional forms7Misspecification8Multicollinearity9Heteroscedasticity10Autocorrelation11Instrumental variables12Simultaneous equations13Panel data14Logit and probit15Unit roots16ARMA, VAR and cointegration17Test Atlas18Hard problems
A question to hold on to
Data from 107 home sales gave P̂ = 119.2 + 0.485 BD + 23.4 BA + 0.156 HS + 0.002 PS + 0.090 A − 35.6 PC, where P is price in ₹ thousand, BD is bedrooms, BA is baths, HS is house size in square feet, PS is plot size, A is age and PC is 1 if the house is in poor condition. If a homeowner converts a bedroom into a bathroom, what is the expected increase in the value of the house?
Delhi School 2019Solved at the end ↓
New here?What is the Ashanagar survey?The invented household survey behind this page's examples: 600 households, generated from a model whose true coefficients we publish.

The Ashanagar survey is invented. The statistics modules used one district of 60 households. Econometrics needs more households and more variables, so this is a new, larger survey of 600 households in the same imaginary district: income, spending, household size, whether the household is in the town or a village, the head’s schooling and earnings.

Because we wrote the data-generating process, we know the true answers, and every lab can show whether a regression recovers them. Household spending, in thousands of rupees a month, was generated as 1 + 0.45 × income + 0.9 × household size + 1.5 × town + an error with standard deviation 2.5. A real survey never tells you its true coefficients. This one does, so you can see how close an estimate comes.

It also holds a variable, the head’s ability, that a real survey could not observe. It is kept so that the lessons on omitted variables can show what happens when it is left out. Every figure here is illustrative, not official statistics.

Households
600
Share in the town
41%
Mean monthly income
₹15.4 thousand
Mean monthly spending
₹12.6 thousand
Mean schooling of the head
8.2 years

How the module uses it →

In this guide
Lesson · about 55 minutes
  1. From one regressor to several
  2. Choosing the coefficients
  3. What holding constant means: seeing it
  4. Reading a coefficient table
  5. What is true of every OLS fit
  6. Which variable matters more?
  7. The opening question, solved
  8. The lesson on one screen
  9. Check yourself
  10. Past papers, by level
01
The idea

From one regressor to several

In the regression primer one variable explained another, and the inference lesson asked how far that slope could be from the truth. Real outcomes have several causes, so the model grows a term for each of them:

The multiple regression model
yi​=β0​+β1​xi1​+β2​xi2​+⋯+βk​xik​+ui​
k regressors and an intercept, so k + 1 coefficients. The error u collects everything the regressors leave out.

Each coefficient has a precise reading: βj is the change in the expected value of y when xj rises by one unit and every other regressor stays where it is. That last clause is the whole point, and it is called ceteris paribus, other things equal.

Take the Ashanagar survey. Regressing monthly household spending (₹ thousand) on income, household size and a town dummy gives

Estimated spending equation, 600 households
spend​=1.225+0.442income+0.904size+1.466town
The true values we built into the data are 1, 0.45, 0.9 and 1.5. Each estimate is within about one standard error of its true value.
  • Income, 0.44. Two households of the same size, both in the town or both in villages, whose incomes differ by ₹1,000 a month differ in spending by about ₹442.
  • Household size, 0.9. Each extra person, at the same income and in the same place, adds about ₹904 a month.
  • Town, 1.47. A dummy variable. A town household spends about ₹1,466 more than a village household with the same income and size.
  • Intercept, 1.23. The predicted spending of a village household with no members and no income, which is outside the data and should not be read literally.
Watch out for

The mistakes examiners are fishing for

  • Reading a coefficient on its own. It is only meaningful given the list of the other variables in the regression. Change the list and the number changes, as the next chapter shows.
  • Reading the intercept as a prediction. It is the fitted value when every regressor is zero, which is often a household or a house that does not exist.
02
How it is computed

Choosing the coefficients

With one regressor, least squares chose the line with the smallest sum of squared vertical gaps. With several it does the same in more dimensions: it picks the k + 1 coefficients that make the sum of squared residuals Σe² as small as possible. You cannot draw the surface for three regressors, but nothing in the logic changes.

Setting the slope of Σe² to zero in every direction gives k + 1 equations, the normal equations. They say two things that every later result leans on: the residuals add up to zero, and they are uncorrelated with every regressor. The matrix form of the same equations is the subject of lesson 2.

Derive it

Least squares makes the residuals orthogonal to every regressor

We want to show
The coefficients that minimise the sum of squared residuals satisfy X′Xb=X′y, which says the residuals sum to zero and are uncorrelated with every regressor.
  1. 1
    Write the thing to be minimised.

    With k coefficients b₀, b₁, …, the residual of household i is ei = yi − b₀ − b₁xi1 − … and the criterion is the sum of their squares:

    S(b)=i∑​ei2​=i∑​(yi​−b0​−b1​xi1​−⋯−bk​xik​)2
  2. 2
    Set each slope of S to zero.

    The sum of squares has one minimum, where its slope in every direction is zero. Differentiating with respect to bj and cancelling the −2:

    ∂bj​∂S​=−2i∑​xij​ei​=0for every j=0,1,…,k (xi0​=1)

    That is k + 1 equations, one per coefficient. In matrix form they say X′e = 0.

  3. 3
    What those equations mean.

    The j = 0 equation is Σei = 0: the residuals sum to zero, so their mean is zero. The others say Σxijei = 0: the residuals are uncorrelated with each regressor. For the survey regression of spending on income, household size and town, the four sums are 0, 0, 0, 0, which are zero up to rounding.

  4. 4
    The normal equations.

    Put e = y − Xb into X′e = 0:

    X′(y−Xb)=0 ⟹ X′Xb=X′y ⟹ b=(X′X)−1X′y

    The last step needs X′X to have an inverse, which fails exactly when one column of X is an exact combination of the others.

  5. 5
    A consequence worth knowing.

    The fitted values are a combination of the columns of X, so they are orthogonal to the residuals too: Σŷe = 0. Then SST = Σ(y − ȳ)² splits cleanly into SSR + SSE with no cross term, which is why R² = SSR ÷ SST is a share between 0 and 1. For the survey regression, SST = 12,313.3, SSR = 8,395 and SSE = 3,918.2, and 8,395 + 3,918.2 = 12,313.3.

Step 1 of 5
So
Setting the slope of the sum of squares to zero gives X′e = 0. Every property of OLS residuals (zero sum, zero correlation with the regressors and with the fitted values, SST = SSR + SSE) follows from that one statement.
Pause and predict
A student fits a regression that includes an intercept and finds that the residuals add up to 12.4. What is the likely explanation?
03
Interactive

What holding constant means: seeing it

In survey data nothing is literally held fixed: households differ in everything at once. The regression does something cleverer. To get the effect of income on spending with household size and town held constant, it first takes household size and town out of both variables, removing whatever they explain of spending and of income. Then it draws the ordinary line through what is left. That slope is the multiple-regression coefficient, exactly.

Try it. Pick a story, tick the controls, and compare the two pictures. The same households are in both, and colour shows town and village.

Hold constant
2468101214165101520253035SchoolingEarnings

Horizontal: years of schooling of the head. Vertical: head's monthly earnings (₹ thousand).

VillageTownLine with no controls
−8−6−4−22468−20−101020x, cleanedy, cleaned

Both axes after the ticked controls are removed from schooling and from earnings, each measured from its own average.

Same line, centred (no controls yet)
Slope with no controls1.807
Slope after the ticked controls1.807
Coefficient on x in the full regression1.807
True value (we wrote the model)1.3
What it shows

Nothing is held constant yet, so the right-hand picture is the left one with the centre moved to zero, and the slope is the raw 1.81. Tick a control to take its influence out of both variables.

In the spending story the raw slope of spending on income is 0.534, but with size and town held constant it falls to 0.442, close to the true 0.45. In the earnings story the slope of earnings on schooling shrinks as you tick the controls, and with both it lands on the truth. The coefficient you read from a regression depends on which controls are in it.

Pause and predict
Spending on household size alone has a slope of 1.16. With income and town in the regression the coefficient on size is 0.9. Why is the raw slope larger?
Derive it

A multiple-regression coefficient is a simple slope after the other variables are removed

We want to show
In the regression of y on x₁ and a set of other variables Z, the coefficient on x₁ equals the slope from regressing the part of y not explained by Z on the part of x₁ not explained by Z (Frisch-Waugh-Lovell).
  1. 1
    Split the regression into the variable of interest and the rest.
    y=x1​b1​+Zc+e,X′e=0 so x1′​e=0 and Z′e=0
  2. 2
    Define the 'remove Z' operation.

    Regress any variable on Z and keep the residual. Write M for that operation, so Mv is v with Z taken out. Two facts: MZ = 0, because Z is entirely explained by Z, and M e = e, because e is already orthogonal to Z.

  3. 3
    Apply M to the whole equation.
    My=(Mx1​)b1​+(MZ)c+Me=(Mx1​)b1​+0+e

    So the cleaned-up y equals b₁ times the cleaned-up x₁, plus the same residual e as before.

  4. 4
    That is a simple regression.

    The residual e is orthogonal to Mx₁, since Mx₁ is x₁ minus a combination of the columns of Z and e is orthogonal to all of those. A simple regression through the origin of My on Mx₁, whose error is orthogonal to the regressor, has slope

    b1​=(Mx1​)′(Mx1​)(Mx1​)′(My)​

    For the survey, take spending on income with household size and the town dummy removed from both. The slope of what is left is 0.442383. The coefficient on income in the regression with all three variables is 0.442383. They are the same number, as the lab on this page shows.

Step 1 of 4
So
“Holding the other variables constant” has an exact meaning: remove the other variables’ influence from y and from x₁ first, then take the ordinary slope. The coefficient measures what is left of x₁ once the other regressors have said everything they can about it.
Watch out for

The mistakes examiners are fishing for

  • Thinking the data were held fixed. Nothing was. Regression compares like with like statistically: it adjusts for the other variables’ measured influence, and cannot adjust for anything that is not in the regression.
  • Assuming extra controls always change the coefficient. A control changes it only if it is related to the variable of interest and to y. A control uncorrelated with x leaves the slope unchanged and only tightens the standard error.
04
Worked examples

Reading a coefficient table

Exams give you a fitted equation and ask what happens to the predicted value when something changes. The rule has one step: for each variable that changes, multiply its coefficient by the size of its change, then add. Variables that do not change contribute nothing. Here is the table from the opening question.

VariableMeaningCoefficientStd. error
Intercept119.223.9
BDbedrooms0.4852.61
BAbathrooms23.410.76
HShouse size, sq ft0.1560.011
PSplot size, sq ft0.0020.00048
Aage, years0.0900.311
PC1 if poor condition−35.610.5

Delhi School 2019, scenario 3. Dependent variable: price in ₹ thousand. n = 107, R² = 0.72, standard error of the regression 41.5.

Delhi School 2019 · easy
A homeowner adds a new bathroom, which increases the house size by 100 square feet. What is the expected increase in the value of the house?
  1. 1
    List what changes.
    Baths rise by 1 and house size by 100 square feet. Bedrooms, plot size, age and condition are unchanged.
  2. 2
    Multiply each coefficient by its change and add.
    23.4 × 1 + 0.156 × 100 = 23.4 + 15.6 = 39.0.
  3. 3
    Mind the units.
    Price is in ₹ thousand, so the increase is 39.0 thousand rupees.
Answer
₹39,000. Notice that the bathroom’s coefficient alone, 23.4, is not the answer: the question changes two variables, and both count.

Dummy variables work the same way. Moving a house from good to poor condition changes PC from 0 to 1 and nothing else, so the predicted price falls by exactly the dummy’s coefficient, ₹35,600. A dummy’s coefficient is a difference between two groups with all else equal.

05
Facts that hold whatever the data

What is true of every OLS fit

The normal equations force several features on any least-squares fit, and exams test them as statements to be called true or false. With an intercept in the model:

  • The residuals sum to zero, so the fitted values have the same mean as y.
  • The residuals are uncorrelated with every regressor, and with the fitted values.
  • The fitted surface passes through the point of means: ȳ = b₀ + b₁x̄₁ + … + bkx̄k.
  • Regressing y on the fitted values gives intercept 0 and slope 1, with the same R² as the original regression.
  • The residual degrees of freedom are n − k − 1: one is lost for each of the k slopes and one for the intercept.

Without an intercept, the first of these fails: the residuals need not sum to zero, and R² is computed differently (lesson 2 returns to this). Here is a five-statement drill.

True or false: facts about OLS · 1 of 5
In an OLS regression with an intercept, the residuals add up to zero.
Watch out for

The mistakes examiners are fishing for

  • Mixing up the regression of y on e with the regression of y on ŷ. Regressing on ŷ reproduces R². Regressing on e gives 1 − R² (the Delhi School asks exactly this).
  • Counting degrees of freedom as n − k. With k slopes plus an intercept it is n − k − 1. Quote the convention a question uses: some papers write k for all parameters, so n − k.
06
Comparing sizes

Which variable matters more?

Coefficients carry the units of their variables, so they cannot be compared: ₹0.44 thousand per ₹ thousand of income is not comparable with ₹0.9 thousand per person. A standardised coefficient removes the units. It says how many standard deviations y moves when x moves by one standard deviation:

Standardised coefficient
βj∗​=bj​sy​sxj​​​
The same number as the coefficient from regressing z-scores on z-scores.
VariableCoefficientStd. deviation of xStandardised
Income (₹ thousand)0.4426.6120.645
Household size (persons)0.9041.5690.313
Town (1) or village (0)1.4660.4920.159

Spending has a standard deviation of 4.53 (₹ thousand) in this survey.

Income dominates: a one-standard-deviation rise in income goes with a 0.65 standard-deviation rise in spending, against 0.31 for size and 0.16 for the town dummy. Size’s raw coefficient is about twice income’s, but household sizes vary little, so a standard-deviation change in size is a small step, and the town dummy, with the largest raw coefficient of all, only switches between two groups. In the Delhi School version of this question you are given b, sx and sy and asked for the product b × sx ÷ sy.

Not a measure of importance by itself

A large standardised coefficient says a variable moves y a lot per typical change in x. It does not say the variable can be changed, or that the relationship is causal. Use it to compare sizes, not to rank policies.

07
Solving the opening question

The opening question, solved

Delhi School 2019 · easy
If a homeowner converts a bedroom into a bathroom, what is the expected increase in the value of the house?
  1. 1
    Two variables change at once.
    Bedrooms fall by 1 and baths rise by 1. Nothing else in the equation changes: the house size is assumed the same, since a room was converted, not added.
  2. 2
    Add each coefficient times its change.
    0.485 × (−1) + 23.4 × (+1) = −0.485 + 23.4 = 22.915.
  3. 3
    Convert the units.
    The dependent variable is in ₹ thousand, so the change is 22.915 thousand rupees.
Answer
₹22,915. A careless reading takes only the bathroom’s coefficient, 23.4, and gets ₹23,400, or adds 0.485 instead of subtracting it. Always write the change in each variable, with its sign, before multiplying.
In economics

Regressions of a price on a long list of characteristics are called hedonic regressions. Each coefficient is the implicit price of an attribute: here, what the market pays for a bathroom or discounts for poor condition, other things equal. The same method prices a year of experience in a wage, a rupee of rent in a flat’s floor area, and a point of exam score in a college’s fees.

08
Revise

The lesson on one screen

The lesson on one screen
Model
y = β₀ + β₁x₁ + … + β_k x_k + u. Each β_j is the effect of x_j with the other regressors held fixed.
Estimation
Least squares minimises Σe². The normal equations X′e = 0 say the residuals sum to zero and are uncorrelated with every regressor.
Partialling out
The coefficient on x₁ is the simple slope after the other regressors are removed from both y and x₁ (Frisch-Waugh-Lovell).
Changes
Predicted change = Σ coefficient × change in that variable. Several variables changing means several terms, with signs.
Always true (with an intercept)
Σe = 0; e uncorrelated with each x and with ŷ; the line passes through the means; y on ŷ gives slope 1, intercept 0, same R²; y on e gives 1 − R².
Degrees of freedom
n − k − 1 with k slopes and an intercept.
Comparing sizes
Standardised coefficient = b × s_x ÷ s_y. Units drop out. Not a measure of causal importance.
09
Practice

Check yourself

0 of 13 correct so far

Compute

A prediction
The fitted equation is ŷ = 10 + 2x₁ + 3x₂. Find the predicted y when x₁ = 4 and x₂ = 5.
Two variables change
Using ŷ = 10 + 2x₁ + 3x₂, x₁ rises by 3 and x₂ falls by 2. Find the change in predicted y.
A dummy coefficient
A wage regression gives ŵ = 8 + 1.5 × experience + 4D, where D = 1 for men and 0 for women. At the same experience, by how much is the predicted wage of a man above that of a woman?
The intercept from the means
A regression with an intercept has ȳ = 20, x̄₁ = 5, x̄₂ = 10, b₁ = 2 and b₂ = −1. Find the intercept.
Degrees of freedom
A regression of y on four regressors and an intercept uses 60 observations. How many residual degrees of freedom does it have?
A standardised coefficient
b = 2.3 for a regressor with standard deviation 5, and the dependent variable has standard deviation 500. A one-standard-deviation change in the regressor goes with how many standard deviations of change in y?
A missing residual
A regression with an intercept on five observations has residuals 2, −1, 3 and −2 for the first four. Find the fifth.
Partialling out
After removing x₂ from both y and x₁, the cleaned-up variables have Σx̃ỹ = 12 and Σx̃² = 24. Find the coefficient on x₁ in the regression of y on x₁ and x₂.

Quick questions

1In a multiple regression, the coefficient on x₁ measures the change in y per unit of x₁
2In an OLS regression that includes an intercept, which is always true?
3Adding a second regressor changes the estimated coefficient on the first if the second
4A regression has k slopes and an intercept, estimated on n observations. The residual degrees of freedom are
5The fitted OLS surface (with an intercept) always passes through
10
Real questions

Past papers, by level

Foundation

Definitions and one-step calculations: a t statistic, an R², which assumption is which. Most CUET and JNU questions sit here.

3 questionsPractise →

Delhi School level

This topic’s hardest questions, from the DSE entrance, are worked through in Lesson 18: The algebra of least squares.

4 questionsLesson 18 →
All 3 past-paper questions for this lesson, easiest first: practise the full set →

✦These are questions from the TestStop bank. A free account answers 10 a day, each with its worked solution; All-Access opens every set with no daily limit.

← The moduleOverview and diagnosticLesson 2 →OLS in matrix form and the Gauss-Markov theorem

Read next

All resources →
EconometricsEconometrics 2: OLS in matrix form and the Gauss-Markov theoremThe estimator (X'X)^-1 X'y worked in exact fractions, the hat and residual-maker matrices, the classical assumptions and what each buys, why OLS is unbiased with variance sigma squared (X'X)^-1, and why it is BLUE.Complete guide · 55 minStatisticsStatistics 7: simple regression, the line of best fit and R²Least squares and residuals, the slope and intercept from covariance and the means, the two regression lines and why their slopes multiply to r², R² as the share explained, rescaling and logs, and what a fitted line does not show.Complete guide · 50 minEconometricsEconometrics for economics students, from multiple regression to time seriesA module in eighteen lessons, built on data where the truth is known: multiple regression, OLS in matrix form and the Gauss-Markov theorem, t and F tests, R squared, dummies, functional form and specification error, multicollinearity, heteroscedasticity and autocorrelation, endogeneity and instruments, simultaneous equations, panel data, binary outcomes, unit roots, ARMA, VAR and cointegration, then a test atlas that says which test fits which problem and the Delhi School's hardest questions, with graded past papers from every exam.Module · 935 min