Skip to main content

Interaction term

Interaction term is the product of two regressors included in a model so that the effect of one variable on the outcome depends on the level of another. A common form multiplies a continuous predictor by a dummy variable.

Also known asinteraction effect

ByHoang TruongUpdated

FrameworkOrdinary least squares (OLS)

See it move

Loading infographic...

A side-by-side comparison shows how the advertising–sales slope differs between small firms (D = 0) and large retailers (D = 1). For small firms the slope is simply β₁ per €1,000 of advertising spend, with the interaction term inactive. For large retailers the interaction term β₃ adds +0.8 percentage points, making the full slope β₁ + 0.8 per €1,000 — a steeper response to the same spend. The note warns that reading β₁ alone is incorrect whenever an interaction term is present, because the true effect depends on D.

Where it fits
SubjectData Analysis & StatisticsAdvancedTopicMultiple Regression & InterpretationAdvanced

The formula

LaTeX
Y=β0+β1X+β2D+β3(X×D)+εY = \beta_0 + \beta_1 X + \beta_2 D + \beta_3 (X \times D) + \varepsilon

Variables

Slope of X when D = 0
Intercept shift for the group coded D = 1
Change in slope for the group coded D = 1 (the interaction coefficient)
Dummy variable (0 or 1) encoding a categorical distinction

Marginal effect of X on Y: β₁ when D = 0; β₁ + β₃ when D = 1.

Interaction Term — Slope Modifier in Regression