A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Interaction Terms in Regression

College Depth 111 in the knowledge graph ☐ I know this ☆ Set as goal
13topics build on this
577prerequisites beneath it
See this on the map →
Interpreting Regression CoefficientsMultiple Regression→→Least Squares Regression: Fundamentals and DerivationSimple Linear Regression Estimation
regression specification interaction

Core Idea

Interaction terms allow the effect of one variable on the outcome to depend on the value of another variable. Including the product of two regressors captures whether their effects are additive or synergistic.

How It's Best Learned

Start with binary indicator interactions to visualize group-specific slopes. Plot predicted values across one variable at different levels of the interacting variable to see how the relationship changes.

Common Misconceptions

The coefficient on the main variable is not the overall effect when interactions are present—the marginal effect depends on the value of the interacting variable. Centering variables changes the interpretation of main effects but not the interaction effect itself.

Explainer

Your regression toolkit so far has assumed that the effect of each predictor on the outcome is fixed — a one-unit increase in education raises wages by the same amount regardless of gender, industry, or any other factor. Interaction terms relax exactly this assumption. They let you ask: does the effect of X on Y depend on the level of some other variable Z?

The mechanics are straightforward: add the product X × Z alongside both main effects. The model becomes Y = β₀ + β₁X + β₂Z + β₃(X × Z) + ε. The marginal effect of X is now ∂Y/∂X = β₁ + β₃Z. This is no longer a single number — it is a function of Z. When Z = 0, the effect of X is just β₁. When Z equals some other value, the effect is β₁ + β₃ times that value. This is why your coefficient interpretation prerequisite matters so much here: β₁ alone no longer summarizes the effect of X on Y in any general sense once an interaction is present.

The clearest case to build intuition is a binary × continuous interaction. Suppose you regress wages on years of education, a female dummy, and their product. The female dummy might have a negative coefficient (wage gap at zero education), the education coefficient captures returns to schooling for men (the reference group), and the interaction coefficient captures how much the education return *differs* for women. A negative interaction coefficient means women get a smaller wage premium per additional year of education. Notice that the female main effect coefficient is now the gap specifically when education = 0 — a quantity that may be extrapolation. This is the core trap: when you include an interaction, the interpretation of each main effect becomes conditional on the interacting variable equaling zero.

Centering the continuous variable before creating the interaction addresses this. If you demean education (subtract its mean) before multiplying, then the main effect for female now represents the wage gap at the average education level — a far more interpretable and estimable quantity. Centering does not change β₃ (the interaction coefficient), does not change model fit, and does not change predicted values — it only rescales what the main effects mean. This is why the common misconception that centering "changes the interaction" is wrong: only the interpretation of the main effects shifts.

A practical diagnostic is to plot predicted values across the range of X for different values of Z (often two or three representative levels). If the lines are parallel, there is no interaction — a multiplicative term will be near zero. If the lines diverge or cross, an interaction is present and substantively meaningful. This visual check is more informative than staring at a single coefficient, because it forces you to think about the full conditional relationship rather than trying to extract a single-number summary from a model where no such number exists.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Angle Pairs: Complementary, Supplementary, and Vertical → Parallel Lines and Transversals → Corresponding Angles → Alternate Interior Angles → Triangle Angle Sum Theorem → Exterior Angle Theorem → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Trigonometric Ratios Review → Radian Measure → Converting Between Degrees and Radians → The Unit Circle → Graphing Sine and Cosine → Graphing Tangent and Reciprocal Trigonometric Functions → Derivatives of Trigonometric Functions → Antiderivatives → Indefinite Integrals → Basic Integration Rules → Riemann Sums → Definite Integral Definition → Probability Density Functions and Continuous Distributions → Cumulative Distribution Functions → Continuous Random Variables → Probability Density Functions → Expected Value → Weak Law of Large Numbers → Probability Axioms and Rules → Conditional Probability → Independence of Events → Sampling Distributions → Standard Error of Estimators → Hypothesis Testing: Framework and Logic → P-values and Statistical Significance → Effect Size and Practical Significance → Hypothesis Testing: Framework and Logic → Z-Tests and T-Tests for Means → One-Sample Z-Test for Means → One-Sample and Two-Sample T-Tests → Inference in Linear Regression → Prediction Intervals in Regression → Linear Regression Basics → Residuals and Goodness of Fit (R²) → Simple (Bivariate) OLS Regression → Classical OLS Assumptions (Gauss-Markov) → Multiple Regression → Interpreting Regression Coefficients → Interaction Terms in Regression

Longest path: 112 steps · 577 total prerequisite topics

Prerequisites (2)

Leads To (2)