Why a Zero-One Predictor Is a Group Comparison
A regression predictor does not have to be a measurement such as age or exposure amount. It can indicate membership in one of two groups. Coding that indicator as zero or one gives the simple regression model a direct group-comparison interpretation: one coefficient gives the reference-group mean, and the other gives the difference between group means.
The interpretation depends on which group is coded zero. Always identify that reference group before interpreting the intercept. The slope’s sign also depends on the coding: it is the mean for the group coded one minus the mean for the group coded zero.
The zero conditional mean assumption makes the interpretation exact: within either group, the average error is zero. No normal distribution, equal group sizes, or equal conditional variances is needed for this coefficient interpretation. Both groups must be represented in the population for the two conditional means, and hence their difference, to be identified from the model.
Deriving the Group-Mean Interpretation
Because \(X\) has only two possible values, substitute each value into the model and take a conditional expectation. When \(X=0\), the term \(\beta_1X\) vanishes. When \(X=1\), it contributes \(\beta_1\). The zero conditional mean assumption removes the error term in both cases.
Subtracting the first conditional mean from the second gives
This is a comparison of conditional averages, not a claim that every person or item in the group coded one has a response exactly \(\beta_1\) units above every member of the reference group. Individual responses can vary around their group’s conditional mean.
Worked Example: Interpreting a Difference in Resolution Times
Hypothetical setting. An insurer compares claim-resolution times for two processing routes. Let \(X=0\) denote the standard route and \(X=1\) the expedited route; let \(Y\) be resolution time in days. Suppose the model’s conditional means are 8.4 days for the standard route and 6.9 days for the expedited route. The response distribution is unspecified; no interest rate or mortality assumption is involved.
Method. Translate the two conditional means into the regression coefficients. Since \(X=0\) is the reference group, its conditional mean is the intercept:
The slope is the mean for the group coded one minus the mean for the group coded zero:
The fitted conditional-mean expression is therefore \(8.4-1.5X\). For the standard route, setting \(X=0\) gives \(8.4-1.5(0)=8.4\) days. For the expedited route, setting \(X=1\) gives \(8.4-1.5(1)=6.9\) days, matching the stated means. The negative slope says the expedited group’s mean resolution time is 1.5 days lower in this comparison.
Check. Adding the slope to the intercept recovers the coded-one group’s mean: \(8.4+(-1.5)=6.9\). The common mistake this avoids is describing the slope as the expedited group’s mean; that mean is \(\beta_0+\beta_1\), not \(\beta_1\) alone.
From Sample Group Means to the Ordinary Least-Squares Fit
The same relationship holds for sample ordinary least squares when the model includes an intercept and the predictor is zero-one coded. Let \(\bar{Y}_0\) be the sample mean among observations with \(X=0\), and let \(\bar{Y}_1\) be the sample mean among observations with \(X=1\). If both groups occur in the sample, the fitted intercept is \(\bar{Y}_0\) and the fitted slope is \(\bar{Y}_1-\bar{Y}_0\).
A short justification follows by describing the fitted values through the two group predictions. Write \(m_0\) for the fitted value at \(X=0\) and \(m_1\) for the fitted value at \(X=1\). The regression coefficients give \(m_0=\hat{\beta}_0\) and \(m_1=\hat{\beta}_0+\hat{\beta}_1\). The sum of squared residuals separates into one sum for each group. Within each group, the sum of squared deviations from a proposed fitted value is minimized by that group’s sample mean. Therefore, \(m_0=\bar{Y}_0\) and \(m_1=\bar{Y}_1\); converting back to coefficients gives the stated result.
This identity concerns the fitted coefficients for the observed sample. It does not say that sample group means must equal the population conditional means; sampling variation can make them differ. Inference about uncertainty requires additional methods and assumptions beyond this interpretation.
Worked Example: Calculating the Fitted Coefficients From Two Groups
Hypothetical setting. A small review records processing cost in dollars for claims assigned to either manual review (\(X=0\)) or a new review route (\(X=1\)). The manual-review costs are \(120,150,130,160\); the new-route costs are \(110,125,125\). Treat these as the complete sample for an ordinary least-squares regression with an intercept. The response distribution is unspecified; no interest rate or mortality assumption is involved.
Method. Calculate each group’s sample mean, then use the binary-predictor identities. For manual review, the total is \(120+150+130+160=560\), with \(n_0=4\), so
For the new route, the total is \(110+125+125=360\), with \(n_1=3\), so
The fitted intercept is the manual-review mean, \(\hat{\beta}_0=140\). The fitted slope is the new-route mean minus the manual-review mean:
Thus the fitted equation is \(\hat{Y}=140-20X\). At \(X=0\), it predicts \(140\) dollars; at \(X=1\), it predicts \(140-20=120\) dollars. As a further check, residuals sum to zero within each group: for \(X=0\), \((-20)+(10)+(-10)+(20)=0\); for \(X=1\), \((-10)+(5)+(5)=0\).
Check. The fitted group values equal the two calculated group means, and their difference is \(-20\) dollars. The common mistake this avoids is reversing the subtraction and reporting \(+20\); the slope is coded-one minus coded-zero, not the reverse.
Changing the Reference Group Changes the Coefficients
The group means do not change when the indicator is recoded, but the coefficient descriptions do. If \(X=1\) identifies group B and \(X=0\) identifies group A, the intercept is group A’s mean and the slope is group B’s mean minus group A’s mean. Define a new indicator \(Z=1-X\), so that \(Z=1\) identifies group A instead. The intercept then describes group B, while the slope becomes group A’s mean minus group B’s mean.
Equivalently, replacing \(X\) by \(Z=1-X\) rewrites the same conditional means as \((\beta_0+\beta_1)-\beta_1Z\). The intercept becomes \(\beta_0+\beta_1\), and the slope becomes \(-\beta_1\). The underlying fitted group means are unchanged.
Worked Example: Reversing the Indicator Coding
Hypothetical setting. A study compares mean follow-up time, in days, for two hypothetical claim-review channels. Channel A has mean 2.4 days and Channel B has mean 3.1 days. Initially, let \(X=1\) identify Channel B and \(X=0\) identify Channel A. The response distribution is unspecified; no interest rate or mortality assumption is involved.
Method. With Channel A as the reference group, the intercept is \(2.4\) days. The slope is Channel B minus Channel A:
Now reverse the coding so \(Z=1\) identifies Channel A and \(Z=0\) identifies Channel B. The new intercept is Channel B’s mean, \(3.1\). The new slope is Channel A minus Channel B:
The original equation gives \(2.4+0.7(0)=2.4\) for A and \(2.4+0.7(1)=3.1\) for B. The recoded equation \(3.1-0.7Z\) gives \(3.1-0.7(1)=2.4\) for A and \(3.1-0.7(0)=3.1\) for B. Both equations describe the same pair of group means.
Check. Reversing the indicator switched the reference-group intercept to \(3.1\) and changed the slope’s sign from \(0.7\) to \(-0.7\), while preserving both predictions. The common mistake this avoids is interpreting a negative recoded slope as evidence that either group mean changed.
Common Traps and What the Coefficients Do Not Say
- Calling the slope a group mean. The coded-one group mean is \(\beta_0+\beta_1\). The slope alone is the difference between that mean and the reference-group mean.
- Using the wrong reference group. The intercept is the conditional mean at \(X=0\), not automatically the mean of the group that seems more important in the application.
- Reversing the subtraction. The slope is the \(X=1\) mean minus the \(X=0\) mean. A negative slope means the coded-one group has the lower mean.
- Confusing a group mean with an overall mean. If \(P(X=1)=p\), the overall population mean is \(\beta_0+p\beta_1\), not generally \(\beta_0\). The intercept equals the overall mean only in special cases, such as \(\beta_1=0\) or \(p=0\).
- Making a causal claim from the coefficient alone. A difference in observed conditional means describes an association. It does not establish that changing group membership would cause the response to change; other differences between the groups may matter.
Check Your Understanding
For each problem, identify the reference group and interpret the requested coefficient or mean.
- A hypothetical study codes \(X=0\) for paper-filed claims and \(X=1\) for portal-filed claims. Their mean handling times are 18 and 23 hours, respectively. What are the intercept and slope in the conditional-mean model? (Answer: Intercept \(18\) hours; slope \(23-18=5\) hours.)
- A model uses \(X=0\) for a standard review and \(X=1\) for an alternate review. Its coefficients are \(\beta_0=72\) and \(\beta_1=-9\), with response measured in dollars. Find each group’s conditional mean and state the group difference. (Answer: Standard mean \(\$72\); alternate mean \(\$63\); alternate minus standard is \(-\$9\).)
- Two hypothetical groups have sample means 410 and 455, with group A coded zero and group B coded one. Give the ordinary least-squares intercept and slope for a model with an intercept. Then recode the indicator so A is coded one. (Answer: Original intercept \(410\), slope \(45\); recoded intercept \(455\), slope \(-45\).)
- A population has \(P(X=1)=0.25\), with \(\beta_0=400\) and \(\beta_1=120\) in the conditional-mean model. Find the two conditional means and the overall mean. (Answer: \(X=0\) mean \(400\); \(X=1\) mean \(520\); overall mean \(400+0.25(120)=430\).)
- A sample contains observations only with \(X=0\), and a regression with an intercept is proposed. Can its sample data determine the binary-predictor slope as a difference between two sample means? Explain. (Answer: No. The \(X=1\) group mean is absent, so the sample cannot determine the two-group difference or fit a distinct coded-one group mean.)