Why Two Correct Slopes Can Point in Opposite Directions
A regression coefficient describes a particular comparison. A marginal slope summarizes the relationship between an outcome and one predictor without controlling for other predictors. An adjusted coefficient describes the relationship with that predictor while holding the included predictors fixed. These are different comparisons, so they need not have the same sign.
A sign reversal can initially seem like a contradiction: how can larger values of a predictor be associated with a higher outcome overall, yet with a lower outcome among observations with the same value of another predictor? The key is that the predictor being studied may vary together with that other predictor, which is also related to the outcome. The examples below trace the arithmetic and keep the two interpretations separate.
The Model and the Source of a Reversal
For the examples, consider the additive multiple regression model
Here, \(\beta_1\) is the adjusted coefficient for \(X\), and \(\beta_2\) is the adjusted coefficient for \(Z\). The additive form assumes that the model uses a straight-line change for each predictor and has no \(X\)-by-\(Z\) interaction: the modelled change per unit of \(X\) is the same at each fixed value of \(Z\). The examples use hypothetical data constructed to satisfy this equation exactly, so their fitted coefficients can be checked directly. The predictor values are not perfectly collinear, meaning neither predictor is an exact linear function of the other and an intercept. This is needed to distinguish their coefficients in the fitted model.
For a simple account of the possible reversal, suppose the relationship follows the model without residual variation. Then, across the observed values,
This follows by substituting \(Y_i=\beta_0+\beta_1X_i+\beta_2Z_i\) into \(S_{XY}\). Centering removes the intercept, leaving \(S_{XY}=\beta_1S_{XX}+\beta_2S_{XZ}\); dividing by \(S_{XX}\) gives the result. Thus, when \(X\) and \(Z\) tend to increase together, \(S_{XZ}/S_{XX}\) is positive. If \(Z\) is positively associated with \(Y\), its contribution to the marginal slope can be large enough to outweigh a negative \(\beta_1\). The reverse can happen if the adjusted \(X\) coefficient is positive and \(Z\)'s contribution is sufficiently negative.
With real data, residual variation can also affect a sample marginal slope. This identity is therefore a useful way to understand the mechanism in an exact illustrative example, not a guarantee that every data set's marginal slope can be determined from the fitted adjusted coefficients alone.
Worked Example: An Overall Increase but a Decrease at Fixed Z
Suppose a hypothetical data set records \(X\), \(Z\), and an outcome \(Y\) for four observations. The units might represent two measured quantities and an outcome score; they are invented only to illustrate the calculations.
| Observation | \(X\) | \(Z\) | \(Y\) |
|---|---|---|---|
| 1 | 0 | 0 | 0 |
| 2 | 1 | 1 | 1 |
| 3 | 2 | 2 | 2 |
| 4 | 3 | 4 | 5 |
Marginal slope. The means are \(\bar{x}=1.5\) and \(\bar{y}=2\). Using centered sums,
Therefore \(b_{\text{marg}}=8/5=1.6\). The marginal regression line has intercept \(\bar{y}-b_{\text{marg}}\bar{x}=2-(1.6)(1.5)=-0.4\), so it is \(\widehat{Y}=-0.4+1.6X\). Without controlling for \(Z\), an increase of one unit in \(X\) corresponds to an increase of 1.6 units in the fitted outcome.
Adjusted coefficients. Each row satisfies \(Y=-X+2Z\), so the multiple regression equation is \(\widehat{Y}=0-X+2Z\). For example, at \(X=3,Z=4\), it gives \(-3+8=5\), matching the recorded outcome. The adjusted coefficient of \(X\) is \(-1\): at the same \(Z\), a one-unit increase in \(X\) corresponds to a one-unit decrease in the fitted outcome.
The predictor values move together in this data: higher \(X\) values tend to occur alongside higher \(Z\) values, and the fitted coefficient for \(Z\) is positive. The marginal slope combines the negative adjusted comparison for \(X\) with the positive association carried along by \(Z\). It is not the same comparison as changing \(X\) while keeping \(Z\) fixed.
Tracing the Reversal in the Other Direction
A sign reversal does not have to mean that the marginal slope is positive and the adjusted coefficient negative. The next example reverses those signs. It uses the same \(X\) and \(Z\) values as the first example to make the distinct outcome relationship easy to see.
Worked Example: An Overall Decrease but an Increase at Fixed Z
Consider a second hypothetical outcome measured for the same four predictor profiles.
| Observation | \(X\) | \(Z\) | \(Y\) |
|---|---|---|---|
| 1 | 0 | 0 | 5 |
| 2 | 1 | 1 | 4 |
| 3 | 2 | 2 | 3 |
| 4 | 3 | 4 | -1 |
The means are \(\bar{x}=1.5\) and \(\bar{y}=2.75\). The centered sums for the marginal regression are
Thus \(b_{\text{marg}}=-9.5/5=-1.9\), and the marginal intercept is \(2.75-(-1.9)(1.5)=5.6\). The fitted marginal line is \(\widehat{Y}=5.6-1.9X\): the overall linear trend is downward.
But each row satisfies \(Y=5+2X-3Z\). The adjusted coefficient of \(X\) is \(+2\). Holding \(Z\) fixed, a one-unit increase in \(X\) corresponds to a two-unit increase in the fitted outcome. For instance, at \(Z=1\), the model predicts \(Y=5+2(1)-3(1)=4\) when \(X=1\), and \(Y=5+2(2)-3(1)=6\) when \(X=2\). This fixed-\(Z\) comparison increases by 2, even though the marginal slope is negative.
Here \(Z\) is positively associated with \(X\), but its adjusted coefficient is negative. As \(X\) increases in the observed data, the accompanying increase in \(Z\) contributes a decrease in \(Y\). That contribution can make the marginal slope negative while the adjusted \(X\) coefficient remains positive.
A Third Check: Calculate Both Slopes in Context
It is useful to verify a reversal in a fresh set of values rather than relying only on a verbal explanation. In the next example, \(X\) might be weekly practice hours, \(Z\) a prior-skill score, and \(Y\) a later assessment score. These are hypothetical data, not results from a real study.
Worked Example: Practice Hours and Prior Skill
| Observation | Practice hours \(X\) | Prior-skill score \(Z\) | Later score \(Y\) |
|---|---|---|---|
| 1 | 1 | 0 | 49 |
| 2 | 2 | 1 | 50 |
| 3 | 3 | 1 | 49 |
| 4 | 4 | 3 | 52 |
| 5 | 5 | 5 | 55 |
The means are \(\bar{x}=3\), \(\bar{z}=2\), and \(\bar{y}=51\). The centered values of \(X\) are \(-2,-1,0,1,2\); those of \(Z\) are \(-2,-1,-1,1,3\); and those of \(Y\) are \(-2,-1,-2,1,4\). Consequently,
The marginal slope is \(14/10=1.4\) points per practice hour, with intercept \(51-(1.4)(3)=46.8\). The marginal line is \(\widehat{Y}=46.8+1.4X\), which summarizes an increasing overall trend.
For the adjusted comparison, all five rows satisfy \(\widehat{Y}=50-X+2Z\). For example, at \(X=4,Z=3\), the fitted value is \(50-4+6=52\), as recorded. The adjusted practice-hours coefficient is \(-1\) point per hour. At a fixed prior-skill score of 1, increasing practice from 2 to 3 hours changes the fitted score from \(50-2+2=50\) to \(50-3+2=49\): a decrease of 1 point. This adjusted comparison differs from the marginal increase of 1.4 points per hour because the marginal line does not hold prior skill fixed.
How to Explain a Sign Reversal
A clear interpretation identifies both the outcome and the comparison represented by each slope. For an adjusted coefficient, name the other predictors being held fixed. For a marginal slope, say that it summarizes the overall relationship without adjustment. Then report the direction and units. Do not describe one as the “real” slope and the other as an arithmetic mistake: they answer different questions.
The additive model is also a substantive choice. Its adjusted coefficient describes a common fitted change across values of \(Z\) because the model contains no interaction. The coefficient is an association under that model, not automatically an effect of changing \(X\). A causal interpretation would require additional justification about how the data were collected and whether relevant sources of bias have been addressed. The calculations above establish neither causation nor statistical significance.
A common mistake is to reason, “The marginal slope is positive, so the adjusted slope must also be positive; if it is negative, the regression has failed.” That reasoning treats different comparisons as if they were identical. The correction is to ask what varies in each comparison: the marginal slope follows the observed joint pattern of \(X\) and the other predictors, whereas the adjusted coefficient compares fitted outcomes at the same values of the included controls.
Check Your Understanding
Use the definitions and examples above to answer these questions.
- In the first worked example, what does the marginal slope of 1.6 describe, and what does the adjusted coefficient of \(-1\) describe?
- In the second example, verify the fitted outcome at \(X=2,Z=2\) using the adjusted equation. How does that fitted value compare with the recorded value?
- Why can a positive association between \(X\) and \(Z\) contribute to a sign reversal when the adjusted coefficient of \(Z\) is negative?
- In the practice-hours example, state the units and comparison represented by the adjusted coefficient of \(-1\).
- Does a sign reversal by itself show that increasing \(X\) causes \(Y\) to change? Explain why or why not.