One Data Set, Two Different Slopes
A regression coefficient can describe a real pattern without describing the pattern you see when you look across all observations. In multiple regression, a predictor’s slope compares outcomes at different values of that predictor while holding the other predictors fixed. The overall trend, by contrast, summarizes how the outcome varies with the predictor in the observed data, without holding those other predictors fixed. These summaries can have different sizes or even different directions.
The difference is not a contradiction. The two slopes answer different questions, and the observed mix of predictor values matters. If observations with larger values of one predictor also tend to have larger or smaller values of another, the overall trend combines both patterns.
For the examples, consider the additive model
Here, \(\beta_1\) is the adjusted slope for \(X\), and \(\beta_2\) is the adjusted slope for \(Z\). “Additive” means the model has no \(X Z\) interaction: the slope for \(X\) is the same at each value of \(Z\). For interpreting these slopes as conditional mean patterns, the model assumes that the conditional mean of the error is zero, \(E(\varepsilon_i\mid X_i,Z_i)=0\). The calculations below use ordinary least squares. No normality assumption is needed to compare the slopes descriptively.
The overall trend is a different calculation: it is the least-squares slope when \(Y\) is regressed on \(X\) alone. It does not hold \(Z\) fixed. In particular, its value can reflect both the relationship of \(Y\) with \(X\) at a fixed \(Z\) and the way \(Z\) varies across observed values of \(X\).
How the Two Slopes Are Related
Write \(b_1\) and \(b_2\) for the fitted coefficients from the multiple regression of \(Y\) on \(X\) and \(Z\), and \(b_{\text{overall}}\) for the simple-regression slope of \(Y\) on \(X\). The following identity makes the difference precise for ordinary least-squares fits with an intercept:
The ratio \(S_{XZ}/S_{XX}\) is the simple-regression slope from regressing \(Z\) on \(X\). If \(Z\) tends to increase as \(X\) increases, this ratio is positive; if \(Z\) tends to decrease as \(X\) increases, it is negative. The identity says that the overall slope combines the adjusted \(X\) slope with a component reflecting the adjusted \(Z\) slope and the association between \(X\) and \(Z\).
Why the Identity Holds
The multiple-regression fitted values are \(\hat{Y}_i=b_0+b_1X_i+b_2Z_i\), and the residuals are \(e_i=Y_i-\hat{Y}_i\). Because the least-squares fit includes an intercept, its residuals have zero sample covariance with \(X\): \(\sum_i(X_i-\bar{X})e_i=0\). Thus, the overall slope, which is \(\sum_i(X_i-\bar{X})(Y_i-\bar{Y})/S_{XX}\), is unchanged if \(Y_i\) is replaced by \(\hat{Y}_i\). Substituting the fitted values gives
The intercept contributes nothing to the centered covariance, which is why it does not appear in the result. This is an algebraic identity for these fitted slopes; it does not say that one slope is better in every setting. The appropriate slope depends on the question being asked.
Worked Example: The Adjusted Slope Is Positive but the Overall Trend Is Negative
Suppose a hypothetical data set records an outcome \(Y\), predictor \(X\), and binary predictor \(Z\). The fitted additive model describes the data exactly as \(Y=2X+10Z\). For \(Z=0\), the observations have \(X=1,2,3\). For \(Z=1\), they have \(X=1\) nine times, \(X=2\) once, and \(X=3\) once. The common within-group slope is 2 outcome units per \(X\) unit.
The observations can be summarized by their counts and outcome values:
| \(Z\) | \(X\) | Count | \(Y=2X+10Z\) |
|---|---|---|---|
| 0 | 1 | 1 | 2 |
| 0 | 2 | 1 | 4 |
| 0 | 3 | 1 | 6 |
| 1 | 1 | 9 | 12 |
| 1 | 2 | 1 | 14 |
| 1 | 3 | 1 | 16 |
Within either group, increasing \(X\) by one unit increases \(Y\) by 2 units. But most observations with \(Z=1\), the group with outcomes 10 units higher at the same \(X\), are concentrated at \(X=1\). To find the overall slope, there are 14 observations, with \(\sum X=20\), \(\sum Y=150\), \(\sum X^2=36\), and \(\sum XY=212\). The simple-regression slope is
So the overall linear trend is negative: in this particular observed data set, the simple-regression line slopes down by about 0.308 outcome units per \(X\) unit. The adjusted slope is positive, at 2 outcome units per \(X\) unit. The negative overall slope does not erase the positive within-group pattern. It reflects that observations in the higher-outcome group are especially numerous at the lower \(X\) value.
Predictor Distribution Can Change the Overall Trend
The previous example is an especially clear contrast. A less dramatic difference in predictor distributions can instead make the overall slope larger than the adjusted slope. The next example computes both from a small data set. Each observation follows the same additive equation, so there is no within-group variation around that equation to complicate the calculation.
Worked Example: The Overall Slope Is Steeper
In a second hypothetical data set, let \(Y=3X+8Z\). There are three observations with \(Z=0\), at \(X=1,2,3\), and three with \(Z=1\), at \(X=2,3,4\). At each fixed value of \(Z\), the adjusted slope for \(X\) is 3 outcome units per \(X\) unit. The higher-\(Z\) group also tends to have larger \(X\).
Across all six observations, the values give \(\sum X=15\), \(\sum Y=69\), \(\sum X^2=43\), and \(\sum XY=201\). Therefore,
The overall slope is about 5.18 outcome units per \(X\) unit, steeper than the adjusted slope of 3. Here, the positive adjusted association of \(Z\) with \(Y\) contributes to the overall upward trend because the \(Z=1\) observations also have larger \(X\) values on average. The fitted adjusted slope and the calculated overall slope use the same data, but they answer different questions.
The formula also shows when the slopes can be equal. They agree if \(S_{XZ}=0\), meaning there is no sample linear association between \(X\) and \(Z\), or if \(b_2=0\). Either condition makes the second term in the identity zero. Agreement in a particular data set is not proof that the overall and adjusted slopes always mean the same thing.
Worked Example: When the Slopes Agree
Consider six hypothetical observations following \(Y=1.5X+5Z\), with \(X=1,2,3\) observed once at each value in each group \(Z=0\) and \(Z=1\). The adjusted slope is 1.5 outcome units per \(X\) unit. Because both groups have the same \(X\) values, the distribution of \(X\) does not differ by \(Z\).
For all six observations, \(\sum X=12\), \(\sum Y=33\), \(\sum X^2=28\), and \(\sum XY=72\). The overall slope is
In this balanced arrangement, the overall slope equals the adjusted slope. The equality follows from the data arrangement, not from a general rule that adjustment leaves a slope unchanged.
What to Look for When Interpreting a Slope
Before interpreting a reported slope, identify which regression produced it. A coefficient of \(X\) in a multiple-regression model is conditional on the other predictors in that model. A slope from a simple regression of \(Y\) on \(X\) summarizes the overall linear trend in the observations used for that regression. The second slope does not hold the other predictors fixed, even if those predictors are included in a different model.
It is also important not to confuse a linear summary with every feature of the data. The overall slope summarizes the linear trend in the observed \(Y\)-versus-\(X\) pattern; it does not guarantee that the pattern is a straight line, or that it applies equally at each value of \(Z\). A scatterplot or a display separated by groups can help reveal structure hidden by a single slope.
A coefficient’s numerical value is expressed in outcome units per predictor unit. In the examples, slopes such as 2 or \(-0.308\) refer to outcome units per \(X\) unit. Their contrast is meaningful only when the variables and units are the same; it is not a comparison of unrelated quantities.
Common Mistake
- Wrong reasoning: “The adjusted slope for \(X\) is positive, so the overall data must show a positive trend in \(X\).” This treats a comparison holding \(Z\) fixed as though it summarized observations regardless of their \(Z\) values.
- Correction: Calculate or inspect the overall trend separately. The association between \(X\) and \(Z\), together with the adjusted slope for \(Z\), can change the size or direction of the overall slope. In the first worked example, the adjusted slope is \(2\), while the overall slope is approximately \(-0.308\).
A careful report names the comparison represented by the slope. Saying “the adjusted slope is positive when \(Z\) is held fixed” and “the overall observed linear trend is negative” is not inconsistent when the data support both statements.
Check Your Understanding
Answer these questions using the definitions and calculations above.
- In the model \(Y=\beta_0+\beta_1X+\beta_2Z+\varepsilon\), what does \(\beta_1\) describe that the overall slope does not?
- If \(Z\) tends to decrease as \(X\) increases and the adjusted slope for \(Z\) is positive, what direction does the additional term in the slope identity have?
- In the first worked example, state both slopes and explain in one sentence why their directions differ.
- Give one condition under which the overall and adjusted slopes are equal according to the slope identity.
- Why is it incorrect to infer the overall trend from the sign of the adjusted slope alone?