Tutorials › Regression Analysis (Undergraduate) › Why Correlated Predictors Can Shift a Slope

Multiple Regression as Adjustment · Tutorial 104 of 991

Why Correlated Predictors Can Shift a Slope

Learn why a predictor’s marginal slope can differ from its adjusted slope when predictors are correlated, and how to calculate the shift.

Beginner 10 min read

What You'll Learn

  • Distinguish a marginal slope from an adjusted slope in a two-predictor model.
  • Identify the predictor correlation and outcome-related slope that contribute to a slope shift.
  • Calculate the marginal slope from the adjusted slopes and the predictor relationship.
  • Use a small hypothetical data set to compare marginal and adjusted slopes.
  • Explain why correlation alone does not establish a causal relationship.

Why Two Slopes Can Differ

A simple regression slope summarizes how the outcome varies with one predictor, without accounting for other predictors. A multiple regression slope describes how the outcome varies with that predictor when the other included predictor is held fixed. If the two predictors are correlated, these slopes need not be the same: changes in one predictor tend to come along with changes in the other, and the other predictor may also be related to the outcome.

The difference is not automatically a sign that either calculation is wrong. Each slope answers a different descriptive question. To understand how they differ, consider a two-predictor model and keep track of two ingredients: how strongly the predictors move together, and how the second predictor is related to the outcome after accounting for the first.

Definition: In a two-predictor regression, the marginal slope for \(X_1\) is the slope from regressing the outcome \(Y\) on \(X_1\) alone. The adjusted slope for \(X_1\) is the coefficient of \(X_1\) in a model that includes both \(X_1\) and \(X_2\). It describes the fitted change in \(Y\) for a one-unit increase in \(X_1\) while \(X_2\) is held fixed.

Use the additive model

$$ Y=\beta_0+\beta_1X_1+\beta_2X_2+\varepsilon. $$

Here, \(\beta_1\) and \(\beta_2\) are the adjusted slopes in the population model, and \(\varepsilon\) represents the part of the outcome not accounted for by the predictors. The additive form means that each predictor has a constant slope across values of the other predictor. It does not include a product term such as \(X_1X_2\).

For the population relationship below, assume the conditional mean of the error is zero: \(E(\varepsilon\mid X_1,X_2)=0\). Also assume the predictors are not perfectly linearly related, so the two separate adjusted slopes can be identified. These are model conditions, not guarantees that the model is a good description of any particular data set. Usual regression inference may require additional conditions, such as independent observations.

How the Predictor Relationship Enters the Slope

The marginal slope in the population is \(\operatorname{Cov}(X_1,Y)/\operatorname{Var}(X_1)\), when \(X_1\) has nonzero variance. Substitute the two-predictor model into the covariance in the numerator. Covariance distributes over sums, and a constant has zero covariance with \(X_1\):

$$ \begin{aligned} \operatorname{Cov}(X_1,Y) &=\operatorname{Cov}\bigl(X_1,\beta_0+\beta_1X_1+\beta_2X_2+\varepsilon\bigr)\\ &=\beta_1\operatorname{Var}(X_1) +\beta_2\operatorname{Cov}(X_1,X_2) +\operatorname{Cov}(X_1,\varepsilon). \end{aligned} $$

Under the stated conditional-mean assumption, \(\operatorname{Cov}(X_1,\varepsilon)=0\). Dividing by \(\operatorname{Var}(X_1)\) gives the slope relationship:

$$ \text{marginal slope for }X_1 = \beta_1+\beta_2 \frac{\operatorname{Cov}(X_1,X_2)}{\operatorname{Var}(X_1)}. $$

The covariance-to-variance ratio is the slope of the linear regression of \(X_2\) on \(X_1\). Thus, the marginal slope combines the adjusted slope for \(X_1\) with a contribution from \(X_2\): that contribution depends on how \(X_2\) changes, on average, with \(X_1\), and on the adjusted slope for \(X_2\).

For a fitted sample, the corresponding relationship is exact when all three slopes come from ordinary least squares on the same observations, with an intercept in each model. If \(b_1\) and \(b_2\) are the fitted adjusted slopes and \(c\) is the sample slope from regressing \(X_2\) on \(X_1\), then

$$ \text{sample marginal slope for }X_1=b_1+b_2c. $$

This sample identity follows because the multiple-regression residuals have sample covariance zero with each included predictor. Therefore, in the sample covariance of \(X_1\) with \(Y\), the residual contributes zero; the fitted part contributes \(b_1\operatorname{Var}(X_1)+b_2\operatorname{Cov}(X_1,X_2)\). Dividing by the sample variance of \(X_1\) yields the stated identity.

Worked Example: A Small Data Set With Correlated Predictors

Suppose a hypothetical, constructed data set records an outcome \(Y\), focal predictor \(X_1\), and other predictor \(X_2\) for six observations. The values are chosen to make the arithmetic transparent; they are not measurements from a real study.

Observation\(X_1\)\(X_2\)\(Y\)
1-226
2-107
30111
40-19
51-211
62016

The outcome values satisfy \(Y=10+3X_1+X_2\) exactly. Thus, the two-predictor least-squares fit has adjusted slopes \(b_1=3\) and \(b_2=1\), with no residuals. The model is additive, and the predictors are not perfectly linearly related: for example, when \(X_1=0\), \(X_2\) takes two different values.

Both predictor means are zero. The sample slope of \(X_2\) on \(X_1\) is

$$ c=\frac{\sum (x_1-\bar{x}_1)(x_2-\bar{x}_2)} {\sum (x_1-\bar{x}_1)^2} =\frac{(-2)(2)+(-1)(0)+(1)(-2)+(2)(0)} {(-2)^2+(-1)^2+0^2+0^2+1^2+2^2} =\frac{-6}{10}=-0.6. $$

The sample marginal slope for \(X_1\) is therefore

$$ b_{\text{marginal}}=b_1+b_2c=3+(1)(-0.6)=2.4. $$

This can also be checked directly. Since \(\bar{y}=10\), the marginal slope is

$$ \frac{\sum(x_1-\bar{x}_1)(y-\bar{y})} {\sum(x_1-\bar{x}_1)^2} =\frac{(-2)(-4)+(-1)(-3)+(1)(1)+(2)(6)}{10} =\frac{24}{10}=2.4. $$

The adjusted slope is 3 outcome units per \(X_1\) unit, whereas the marginal slope is 2.4 outcome units per \(X_1\) unit. In this constructed data set, \(X_2\) tends to be lower when \(X_1\) is higher, and higher \(X_2\) adds to the fitted outcome. That pattern accounts for the difference. The exact fit makes the calculation easy to verify; real data generally have residual variation, and the model’s suitability would need to be assessed rather than assumed from a table.

Reading the Direction and Size of the Shift

The formula gives a direct way to reason about the difference. The marginal slope equals the adjusted slope plus a product. If the predictors are positively correlated, the slope of \(X_2\) on \(X_1\) is positive; if they are negatively correlated, it is negative. The adjusted slope for \(X_2\) determines how that predictor’s co-movement contributes to the outcome trend. Both ingredients matter.

Worked Example: Irrigation and Soil Moisture

Imagine a hypothetical additive model for crop yield, measured in kilograms per plot, with irrigation \(X_1\) measured in litres per plot and soil moisture \(X_2\) measured in percentage points. Suppose a fitted model has adjusted slopes \(b_1=1.8\) kilograms per litre and \(b_2=0.5\) kilograms per soil-moisture percentage point. In the same data, the slope from regressing soil moisture on irrigation is \(c=0.4\) percentage points per litre.

Assume the observations are adequately represented by the additive model for this comparison, the predictors are not perfectly collinear, and the adjusted coefficients are from the same observations as the marginal fit. Then the sample marginal slope is

$$ b_{\text{marginal}}=b_1+b_2c =1.8+(0.5)(0.4) =2.0\text{ kilograms per litre}. $$

The marginal slope is 2.0 kilograms per litre, compared with an adjusted slope of 1.8 kilograms per litre. The added 0.2 is the product of the soil-moisture slope and the average soil-moisture change associated with one additional litre of irrigation. The marginal slope describes the overall linear association in these data; the adjusted slope compares fitted outcomes at the same soil-moisture level. Neither comparison, by itself, establishes that changing irrigation causes a change in yield.

Worked Example: A Negative Predictor Relationship

Consider another hypothetical additive regression, this time predicting a laboratory outcome \(Y\) from a focal predictor \(X_1\) and a second predictor \(X_2\). Suppose the fitted adjusted slopes are \(b_1=4.0\) outcome units per \(X_1\) unit and \(b_2=2.5\) outcome units per \(X_2\) unit. Suppose the sample slope of \(X_2\) on \(X_1\) is \(c=-0.8\) \(X_2\) units per \(X_1\) unit.

With the same observations used for the marginal and adjusted fits, and an intercept in each ordinary least-squares model, the calculation is

$$ b_{\text{marginal}}=b_1+b_2c =4.0+(2.5)(-0.8) =4.0-2.0 =2.0\text{ outcome units per }X_1\text{ unit}. $$

The two-predictor additive form and lack of perfect collinearity are needed to interpret the adjusted slopes separately. The calculation shows that the negative relationship between \(X_1\) and \(X_2\), together with the positive adjusted slope for \(X_2\), contributes \(-2.0\) to the marginal slope. The marginal and adjusted slopes differ even though both are calculated correctly: they summarize different comparisons.

What Correlation Does—and Does Not—Tell You

Correlation alone is not enough to predict a slope shift. If \(X_1\) and \(X_2\) are uncorrelated in the population, the covariance term is zero, so the marginal and adjusted slopes for \(X_1\) agree under the stated model conditions. They also agree if \(\beta_2=0\), even when the predictors are correlated: in that case, the model assigns no linear outcome contribution to \(X_2\) after accounting for \(X_1\). In other cases, the shift depends on the product of the predictor relationship and the adjusted outcome slope for \(X_2\).

The model conditions matter. If the conditional mean is not adequately described by the additive form, or if the error is related to the predictors, the population formula may not describe the situation as stated. In practice, data can reveal patterns that raise concerns about linearity or unusual observations, but a slope calculation alone does not verify the model assumptions. Nor does holding a measured predictor fixed remove every possible source of difference between groups.

Key takeaway: In a two-predictor additive model, the marginal slope for \(X_1\) differs from its adjusted slope by a contribution involving both the relationship between \(X_1\) and \(X_2\) and the adjusted slope for \(X_2\). A marginal slope and an adjusted slope answer different questions; neither should be treated as a causal effect without additional justification.

Common Mistake

A common mistake is to say, “The predictors are correlated, so the marginal slope must differ from the adjusted slope.” Correlation by itself does not guarantee a difference. If the second predictor has adjusted slope zero, its contribution is zero; if the predictors have zero covariance, their co-movement contributes zero under the model. The correction is to examine both factors in the formula, not correlation alone.

Another mistake is to interpret the shift as proof that one coefficient is biased or that adjustment has uncovered a causal effect. The slopes describe different associations under a specified model. Whether a causal interpretation is justified depends on the study design and assumptions beyond this arithmetic.

Check Your Understanding

Use the two-predictor slope relationship to answer these questions.

  1. In an additive model, the adjusted slope for \(X_2\) is 3 outcome units per \(X_2\) unit, and the slope of \(X_2\) on \(X_1\) is 0.5 \(X_2\) units per \(X_1\) unit. If the adjusted slope for \(X_1\) is 2, what is the marginal slope for \(X_1\)?
  2. Can correlated predictors have the same marginal and adjusted slope for \(X_1\)? Give one condition under which they do.
  3. If the adjusted slope for \(X_2\) is positive but \(X_2\) tends to decrease as \(X_1\) increases, what sign does the \(X_2\) contribution have in the slope relationship?
  4. In words, what comparison does the adjusted slope for \(X_1\) describe, and how does that differ from the marginal slope?
  5. Why does a difference between marginal and adjusted slopes not, on its own, establish a causal relationship?