Sub topic 2
The multiple regression model and what a partial slope means
This chapter assumes you already know simple linear regression: the slope and intercept, the residual, and a basic t-test with a p-value. It builds the multiple regression model from that base and explains how to read each coefficient. Later chapters cover the assumptions, the tests, fit measures and the failure modes. Here the focus is the model itself.
From one regressor to many
Simple regression explains a dependent variable with one independent variable. A multiple regression uses k independent variables:
Yi = b0 + b1 X1i + b2 X2i + ... + bk Xki + e_i
The terms are:
| Symbol | Name | Meaning |
|---|---|---|
| Y_i | Dependent variable | The outcome for observation i, such as a fund's excess return |
| X1_i ... Xk_i | Independent variables | The k explanatory variables, also called regressors |
| b0 | Intercept | The expected Y when every X equals zero |
| b1 ... bk | Partial slope coefficients | The effect of one X on Y, holding the other X variables constant |
| e_i | Error term | The part of Y that the regressors do not explain |
Ordinary least squares (OLS) picks the coefficients that minimize the sum of squared residuals. A residual is the actual Y minus the fitted Y. With one regressor you can draw the fitted line. With two you fit a plane. With more, you cannot picture it, but the same logic holds.
The model is linear in the coefficients. It does not have to be linear in the variables. You can include X squared or ln(X) as a regressor and still use OLS. The misspecification chapter returns to this.
What a partial slope means
The central idea of this chapter is that b1 is not "the effect of X1 on Y". It is the expected change in Y for a one-unit change in X1, with all other regressors held constant. The phrase "holding constant" is why the coefficient is called partial.
This matters because a slope from a simple regression and a slope from a multiple regression can differ a lot. When X1 and X2 are correlated, a simple regression of Y on X1 lets X1 take credit for some of what X2 does. The multiple regression separates the two.
Another way to see it: b1 measures the relationship between Y and the part of X1 that is not explained by the other regressors. The procedure has three steps:
- Regress X1 on all the other regressors and keep the residuals. These residuals are the part of X1 that the others cannot predict.
- Regress Y on those residuals.
- The slope you get equals b1 from the full multiple regression.
This result is known as the Frisch-Waugh-Lovell theorem. You do not need to prove it for the exam. It is useful because it explains why correlated regressors change each other's coefficients.
A worked example
Suppose an analyst regresses a fund's monthly excess return (in percent) on the market's excess return (MKT, in percent) and a size factor (SMB, in percent). The estimated equation is:
Predicted return = 1.20 + 0.85 MKT − 0.30 SMB
The interpretation of each coefficient:
- Intercept, 1.20. When MKT and SMB are both zero, the fund is expected to return 1.20% per month. In factor terms this is the fund's alpha estimate.
- 0.85 on MKT. If MKT rises by 1 percentage point and SMB stays the same, the fund's expected return rises by 0.85 percentage points.
- −0.30 on SMB. If SMB rises by 1 point and MKT stays the same, the fund's expected return falls by 0.30 points.
To predict, substitute values. If MKT = 4 and SMB = 2:
1.20 + 0.85 × 4 − 0.30 × 2 = 1.20 + 3.40 − 0.60 = 4.00
The predicted excess return is 4.00% for that month.
Seeing it in code
The simulation below creates two correlated regressors. The true partial slope on x1 is 2.0 and the true slope on x2 is −1.0. It then compares three slopes on x1: the multiple regression slope, the simple regression slope, and the slope from the residual method described above.
import numpy as np
import statsmodels.api as sm
rng = np.random.default_rng(7)
n = 500
x2 = rng.normal(size=n)
x1 = 0.6 * x2 + rng.normal(size=n) # x1 is correlated with x2
y = 1.0 + 2.0 * x1 - 1.0 * x2 + rng.normal(size=n)
# Multiple regression: partial slope on x1
full = sm.OLS(y, sm.add_constant(np.column_stack([x1, x2]))).fit()
# Simple regression: x1 alone
simple = sm.OLS(y, sm.add_constant(x1)).fit()
# Residual method: strip x2 out of x1, then regress y on what is left
x1_resid = sm.OLS(x1, sm.add_constant(x2)).fit().resid
partial = sm.OLS(y, sm.add_constant(x1_resid)).fit()
print("multiple regression slope on x1:", round(full.params[1], 3))
print("simple regression slope on x1: ", round(simple.params[1], 3))
print("residual method slope on x1: ", round(partial.params[1], 3))Expect the first and third numbers to match exactly and to sit near 2.0. The simple regression slope lands near 1.56. It is pulled down because x1 carries information about x2, and x2 has a negative effect on y. The expected gap is the true b2 times cov(x1, x2) / var(x1), which is −1.0 × 0.6 / 1.36, or about −0.44.
That gap is omitted variable bias, a form of misspecification covered in a later chapter. It appears here because it shows why the partial slope differs from the simple slope.
The next example fits the full model on simulated data and prints the standard regression output you will read throughout this tutorial.
import numpy as np
import statsmodels.api as sm
rng = np.random.default_rng(42)
n = 200
x1 = rng.normal(size=n)
x2 = rng.normal(size=n)
y = 1.0 + 2.0 * x1 - 1.0 * x2 + rng.normal(size=n)
X = sm.add_constant(np.column_stack([x1, x2]))
model = sm.OLS(y, X).fit()
print(model.params)
print(model.tvalues)
print(model.rsquared, model.rsquared_adj)
print(model.fvalue, model.f_pvalue)
print(model.aic, model.bic)sm.add_constant adds a column of ones. Without it, statsmodels fits a model with no intercept, which forces the line through the origin. The params array is ordered as the intercept first, then x1, then x2. The estimates should be near 1, 2 and −1. The remaining lines print statistics that later chapters explain: t-statistics, R-squared, adjusted R-squared, the F-statistic, AIC and BIC.
Degrees of freedom
Every test in multiple regression depends on degrees of freedom. With n observations and k independent variables, the model estimates k + 1 coefficients, the k slopes and the intercept. The residual degrees of freedom are:
df = n − k − 1
Adding a regressor uses up one degree of freedom. With few observations and many regressors, the residual degrees of freedom shrink, the t critical values grow, and estimates become less stable. A common rule of thumb is to keep n well above k, with at least several observations per regressor. The CFA curriculum does not give a fixed cutoff.
Reading a regression output table
The CFA exam often gives you a table and asks you to interpret or compute from it. A typical table looks like this:
| Term | Coefficient | Standard error | t-statistic |
|---|---|---|---|
| Intercept | 1.20 | 0.40 | 3.00 |
| MKT | 0.85 | 0.10 | 8.50 |
| SMB | −0.30 | 0.20 | −1.50 |
The t-statistic is the coefficient divided by its standard error, for example 0.85 / 0.10 = 8.50. Each t-statistic tests the null hypothesis that the true coefficient is zero. The next chapters cover the tests in detail. For now, note that each row answers a question about one coefficient, given that the other regressors are already in the model.
That last condition is the second half of the partial-slope idea. A variable's coefficient and its significance can change when you add or drop another regressor. A variable that looks significant alone can become insignificant once a correlated variable enters.
Common errors in interpretation
- Dropping "holding the others constant". Saying "a one-point rise in MKT raises the return by 0.85" is incomplete. State that the other variables are held fixed.
- Treating the intercept as meaningful by default. The intercept is the predicted Y when all X variables are zero. If zero is outside the range of the data, the intercept is just an anchor for the plane. Do not read an economic story into it.
- Reading coefficient size as importance. A coefficient depends on the units of its variable. A regressor measured in dollars and one measured in millions of dollars have slopes that differ by a factor of a million. Compare slopes only when the units are comparable.
- Confusing partial and simple slopes. If a question gives you a simple regression slope and a multiple regression slope for the same variable, they answer different questions. Do not expect them to match.
- Causal language. The partial slope describes an association, adjusted for the other regressors in the model. It becomes a causal effect only if the model includes every relevant variable and the assumptions hold. The next chapter covers those assumptions.
Summary of the working model
A multiple regression fits Y as a linear combination of k regressors plus an error. Each slope is a partial slope: the expected change in Y per unit change in that regressor, holding the others constant. Equivalently, it is the simple-regression slope of Y on the part of that regressor that the others do not explain. The model uses n − k − 1 residual degrees of freedom. Each coefficient is tested separately with a t-statistic. The next chapter lists the assumptions that make those tests valid.
Exercise
A regression of a stock's return on the market return (MKT) and a value factor (HML), all in percent, gives: predicted return = 0.50 + 1.10 MKT + 0.40 HML, estimated with n = 60 monthly observations. (a) Interpret the coefficient 0.40. (b) Predict the return when MKT = 3 and HML = −2. (c) How many residual degrees of freedom does the model have? (d) The simple regression of the return on MKT alone gives a slope of 1.25, not 1.10. Give one reason the two slopes can differ.
Show answer
(a) Holding MKT constant, a one-percentage-point increase in HML is associated with a 0.40-point increase in the stock's expected return. (b) 0.50 + 1.10 × 3 + 0.40 × (−2) = 0.50 + 3.30 − 0.80 = 3.00, so the predicted return is 3.00%. (c) df = n − k − 1 = 60 − 2 − 1 = 57. (d) The simple regression slope on MKT also absorbs the part of HML's effect that is correlated with MKT. The multiple regression holds HML constant, so its slope on MKT excludes that overlap. The two slopes answer different questions and match only if MKT and HML are uncorrelated.
Exercise
In the simulation in this chapter, the true model is Y = 1 + 2 X1 − 1 X2 + e, and X1 is positively correlated with X2. Why does the simple regression slope on X1 come out below 2?
Show answer
X2 has a negative effect on Y and is positively correlated with X1. In a simple regression, X1 picks up part of X2's negative effect, which pulls its slope below the true partial slope of 2. In the multiple regression, X2 is held constant, so the slope on X1 is close to 2.