Tutorials › Econometrics (Graduate) › Interaction Effects on Binary-Outcome Probabilities

Binary Choice Models · Tutorial 464 of 952

Interaction Effects on Binary-Outcome Probabilities

Learn to calculate and interpret probability-scale interactions in logit and probit models without confusing index coefficients, local derivatives, and finite probability contrasts.

Intermediate 10 min read

What You'll Learn

  • Specify logit and probit conditional probability models with an interaction term.
  • Derive the probability-scale cross-partial for two continuous regressors.
  • Evaluate how the index location and curvature affect the size and sign of an interaction effect.
  • Calculate a probability difference-in-differences for two binary regressors.
  • Explain why the interaction coefficient alone does not determine the probability-scale effect.

Why Interaction Effects Need a Probability-Scale Calculation

In a linear probability model, an interaction coefficient directly gives the change in one regressor’s slope as another regressor changes. In logit and probit models, the model is linear in an index, but the conditional probability is a nonlinear transformation of that index. As a result, an interaction coefficient does not, by itself, tell us the size or even the sign of the interaction on the probability scale.

There are two related but distinct calculations. When both regressors are continuous, a local probability-scale interaction is a cross-partial derivative. When both are binary, the relevant finite contrast is a difference-in-differences across the four regressor combinations. A derivative describes a local rate of change; a difference-in-differences compares four predicted probabilities. Neither should be replaced by the coefficient of the interaction term.

Model and Notation

Let \(Y\) be a binary outcome, and let \(x\) and \(z\) be two regressors. For fixed values of any other covariates, consider the conditional probability model

$$ P(Y=1\mid x,z)=F(\eta), \qquad \eta=\beta_0+\beta_1x+\beta_2z+\beta_{12}xz. $$

For logit, \(F(\eta)=\Lambda(\eta)=1/(1+\exp(-\eta))\). For probit, \(F(\eta)=\Phi(\eta)\), the standard normal cumulative distribution function. In both cases \(F\) is nonlinear. The interaction coefficient \(\beta_{12}\) is therefore a coefficient on the model’s index, not a probability-scale interaction.

This specification describes conditional probabilities. Interpreting a fitted probability contrast as a causal effect requires additional design and identification assumptions; the calculations below alone establish no causal claim. For continuous regressors, assume the conditional probability function is differentiable in \(x\) and \(z\). For binary regressors, use the model’s predictions at the four possible combinations rather than treating a binary change as an infinitesimal derivative.

Definition: For two continuous regressors, the probability-scale interaction at \((x,z)\) is the cross-partial derivative \(\partial^2 P(Y=1\mid x,z)/(\partial x\,\partial z)\). For two binary regressors \(A\) and \(B\), the probability-scale interaction is the difference-in-differences \(P_{11}-P_{10}-P_{01}+P_{00}\), where \(P_{ab}=P(Y=1\mid A=a,B=b)\), holding other covariates fixed.

Cross-Partials for Continuous Regressors

Write \(P=F(\eta)\). The index derivatives are \(\eta_x=\beta_1+\beta_{12}z\), \(\eta_z=\beta_2+\beta_{12}x\), and \(\eta_{xz}=\beta_{12}\). Applying the chain rule first gives \(P_x=F'(\eta)\eta_x\). Differentiating this expression with respect to \(z\) yields the cross-partial:

$$ \frac{\partial^2 P}{\partial x\,\partial z} = F''(\eta)(\beta_1+\beta_{12}z)(\beta_2+\beta_{12}x) + F'(\eta)\beta_{12}. $$

The two terms have different sources. The term \(F'(\eta)\beta_{12}\) reflects the interaction in the index, scaled by the local slope of the link. The term involving \(F''(\eta)\) reflects the curvature of the link: even if the index has no interaction, changing one regressor’s slope can change the probability-scale slope because the other regressor moves the index to a region with a different link slope.

For logit, if \(p=\Lambda(\eta)\), then \(F'(\eta)=p(1-p)\) and \(F''(\eta)=p(1-p)(1-2p)\). For probit, with \(\phi\) the standard normal density, \(F'(\eta)=\phi(\eta)\) and \(F''(\eta)=-\eta\phi(\eta)\). These expressions show why the cross-partial depends on the index and the regressor values as well as on \(\beta_{12}\).

Worked Example: A Logit Cross-Partial Can Change Sign

Suppose a hypothetical logit model predicts whether a participant completes a course from weekly training hours \(x\) and weekly coaching hours \(z\). Let \(x\) and \(z\) be measured in hours, and suppose the specified coefficients are \(\beta_0=0\), \(\beta_1=0.8\), \(\beta_2=0.6\), and \(\beta_{12}=0.5\). Calculate the cross-partial at \((0,0)\) and at \((1,1)\).

At \((0,0)\), \(\eta=0\), so \(p=0.5\), \(F'=p(1-p)=0.25\), and \(F''=p(1-p)(1-2p)=0\). The index slopes are \(\eta_x=0.8\) and \(\eta_z=0.6\). Substitution gives

$$ \frac{\partial^2 P}{\partial x\,\partial z} =0(0.8)(0.6)+(0.25)(0.5)=0.125. $$

At this point, the local cross-partial is \(0.125\) probability units per training-hour per coaching-hour. At \((1,1)\), \(\eta=0.8+0.6+0.5=1.9\), \(p=\Lambda(1.9)\approx0.8699\), \(F'\approx0.1132\), and \(F''\approx-0.08375\). The index slopes are \(\eta_x=1.3\) and \(\eta_z=1.1\), so

$$ \frac{\partial^2 P}{\partial x\,\partial z} \approx (-0.08375)(1.3)(1.1)+(0.1132)(0.5) \approx -0.0632. $$

The cross-partial is positive at the first point and negative at the second, although the interaction coefficient is \(0.5\) in both calculations. The sign reversal comes from the link’s curvature and the changing index slopes. These are local probability-scale rates, not finite changes in course-completion probability.

Binary Regressors: Difference-in-Differences

If \(A\) and \(B\) are binary, denote the model-predicted probability at \(A=a,B=b\) by \(P_{ab}\). The probability-scale interaction is

$$ \Delta_{AB}^{P}=P_{11}-P_{10}-P_{01}+P_{00}. $$

This contrast asks how much the change from \(A=0\) to \(A=1\) differs between \(B=0\) and \(B=1\). Equivalently, it subtracts the \(A\)-change when \(B=0\) from the \(A\)-change when \(B=1\). It is an exact finite contrast of four probabilities, conditional on the same values of any other covariates.

In an index containing \(\beta_{AB}AB\), the index-scale contrast is \(\eta_{11}-\eta_{10}-\eta_{01}+\eta_{00}=\beta_{AB}\). But applying a nonlinear \(F\) to each index does not preserve that contrast. In particular, \(\beta_{AB}=0\) does not imply \(\Delta_{AB}^{P}=0\).

Worked Example: Positive Probability Contrast with No Index Interaction

Consider hypothetical logit predictions for two binary service features \(A\) and \(B\), with \(\eta=-2+A+B\). Thus the interaction coefficient is zero. Calculate the probability difference-in-differences.

The four indices are \(\eta_{00}=-2\), \(\eta_{10}=-1\), \(\eta_{01}=-1\), and \(\eta_{11}=0\). Using \(P_{ab}=\Lambda(\eta_{ab})\), the unrounded probabilities are approximately \(P_{00}=0.119202922\), \(P_{10}=P_{01}=0.268941421\), and \(P_{11}=0.5\). Therefore,

$$ \Delta_{AB}^{P} =0.5-2\left(\frac{1}{1+\exp(1)}\right) +\frac{1}{1+\exp(2)} \approx 0.08132008 \approx 0.0813. $$

The modeled probability change associated with \(A\) is about 0.0813 larger when \(B=1\) than when \(B=0\), or about 8.13 percentage points. This nonzero probability contrast occurs despite a zero interaction coefficient on the logit index. It is a model-based conditional contrast, not evidence by itself that either service feature causes the outcome.

Worked Example: The Same Zero Interaction Can Give a Negative Contrast

Now consider another hypothetical logit specification, \(\eta=2+A+B\), again with \(\beta_{AB}=0\). The main-effect coefficients are the same as in the previous example, but the index is located in a different part of the logistic curve. Calculate the probability contrast from unrounded predictions.

The indices for \(00,10,01,11\) are \(2,3,3,4\). The corresponding probabilities are \(\Lambda(2)\), \(\Lambda(3)\), \(\Lambda(3)\), and \(\Lambda(4)\). Thus

$$ \Delta_{AB}^{P} =\frac{1}{1+\exp(-4)} -2\left(\frac{1}{1+\exp(-3)}\right) +\frac{1}{1+\exp(-2)} \approx -0.04233738 \approx -0.0423. $$

Here the probability change associated with \(A\) is about 4.23 percentage points smaller when \(B=1\) than when \(B=0\). The result differs in sign from the previous example even though the index interaction is zero in both. The contrast uses the unrounded model probabilities; subtracting probabilities first rounded to four decimal places can produce a slightly different last digit.

Probit Cross-Partial in a Worked Calculation

The same chain-rule result applies to probit, but the link derivatives differ. For \(P=\Phi(\eta)\), the probability-scale cross-partial is

$$ \frac{\partial^2 P}{\partial x\,\partial z} = -\eta\phi(\eta)(\beta_1+\beta_{12}z)(\beta_2+\beta_{12}x) +\phi(\eta)\beta_{12}. $$

Worked Example: Probit Curvature Changes the Local Interaction

Suppose a hypothetical probit model predicts a binary outcome from two continuous measures, \(x\) and \(z\), with \(\beta_0=0\), \(\beta_1=0.5\), \(\beta_2=0.4\), and \(\beta_{12}=0.3\). At \((0,0)\), the index is zero and \(\phi(0)\approx0.398942\). Since \(-\eta\phi(\eta)=0\) there, the cross-partial is

$$ 0(0.5)(0.4)+(0.398942)(0.3) \approx 0.1197. $$

At \((1,1)\), \(\eta=0.5+0.4+0.3=1.2\), the index slopes are \(\eta_x=0.8\) and \(\eta_z=0.7\), and \(\phi(1.2)\approx0.194186\). Hence \(F''(1.2)=-1.2(0.194186)\approx-0.233023\), giving

$$ \frac{\partial^2 P}{\partial x\,\partial z} \approx (-0.233023)(0.8)(0.7)+(0.194186)(0.3) \approx -0.0722. $$

The probit cross-partial is positive at the first point and negative at the second. As with logit, the interaction coefficient \(0.3\) alone does not determine the probability-scale interaction.

Interpretation and Common Pitfalls

For continuous regressors, a positive cross-partial means that, locally, increasing \(z\) raises the probability-scale slope with respect to \(x\), or equivalently that increasing \(x\) raises the slope with respect to \(z\). A negative value means the local slope decreases. The units are probability units per unit of \(x\) per unit of \(z\). This local statement does not describe the probability change over a large finite movement.

For binary regressors, the difference-in-differences is in probability units, often converted to percentage points for communication. It compares finite changes over the \(0\)-to-\(1\) transitions. Do not call this contrast a cross-partial derivative: the two coincide only as a suitable local approximation when changes are small and the probability function is smooth, not as a general identity for binary changes.

  • Mistake: “The interaction coefficient is positive, so the probability interaction must be positive.” Correction: For continuous regressors, evaluate the cross-partial at specified covariate values; for binary regressors, calculate the four predicted probabilities and their contrast.
  • Mistake: “A zero logit or probit interaction coefficient means no probability interaction.” Correction: Link curvature can produce a nonzero probability contrast, as the binary examples show.
  • Mistake: “A binary difference-in-differences is the mixed derivative.” Correction: The former is a finite contrast; the latter is a local rate of change.
  • Mistake: “The calculated contrast is automatically causal.” Correction: It is a conditional model-based comparison; causal interpretation needs appropriate identification assumptions.

The practical implication is that a probability-scale interaction should be reported with its definition and evaluation point or covariate profile. A coefficient alone is insufficient, and estimates at different profiles can have different magnitudes or signs. The calculations here describe the point-estimated model; uncertainty about these nonlinear effects requires separate inferential procedures.

Check Your Understanding

Use the definitions and formulas in this tutorial to answer the following questions.

  1. For a logit model with two continuous regressors, identify the two terms in the cross-partial and explain what generates each one.
  2. Why can a positive logit interaction coefficient coexist with a negative probability-scale cross-partial at some covariate values?
  3. For two binary regressors, write the probability difference-in-differences and explain in words what it compares.
  4. Can a zero interaction coefficient in a probit model guarantee a zero probability difference-in-differences? Explain.
  5. What additional assumptions would be needed before interpreting a model-based probability interaction as causal?
Clinical Biostats