# Interpretation of interaction of a continuous and a dummy variable in linear regression

I have the regression

$$y = \beta_0 + \beta_1 x_1 + \beta_2 D + \beta_3 x_1 D + \varepsilon$$

where $$x_1$$ and $$y$$ are continuous, and $$D$$ is binary. Say the estimates are as follows:

$$y = 0.02 + 0.5 x_1 + 2 D + 0.7 x_1 D + \varepsilon$$

Questions:

1. What is the interpretation of $$\beta_3$$?
2. How do I get the 'total effect' of $$x_1$$ and $$D$$? Is it $$\beta_1 + \beta_3$$ or is it $$\beta_1 + \beta_2 + \beta_3$$?
• Is your $D$ binary? Or does it have more than two categories (in which case, what are the other coefficients?)? Jul 26, 2022 at 8:48
• binary, changed in the question. Jul 26, 2022 at 11:10

1. $$\beta_3$$ is the difference in slopes of $$\mathbb{E}(Y|X_1)$$ vs. $$X_1$$ between observations that have $$D=1$$ and these that have $$D=0$$. The slope for the former is $$0.5+0.7=1.2$$ and for the latter $$0.5$$.
On he other hand, consider switching from $$D=0$$ to $$D=1$$ and the "effect" of that on $$\mathbb{E}(Y|D)$$; $$\beta_3$$ is the difference between two observations that differ by $$1$$ in terms of $$X_1$$. ("Effect" need not be causal, it could be just probabilistic.) I.e. $$\mathbb{E}(Y|X_1=x_1+1,D=1)-\mathbb{E}(Y|X_1=x_1+1,D=0)=\beta_2+\beta_3 (x_1+1)$$, $$\mathbb{E}(Y|X_1=x_1,D=1)-\mathbb{E}(Y|X_1=x_1,D=0)=\beta_2+\beta_3 x_1$$ and the difference between the two is $$\beta_3$$.
2. How do you define the "total effect"? E.g. $$\mathbb{E}(Y|X_1=x_1+1,D=1)-\mathbb{E}(Y|X_1=x_1,D=0)=\beta_1+\beta_2+\beta_3 (x_1+1)$$.
• Thanks! For 1. could it not also be interpreted to other way around as the difference in effects of $D$ for different values of $X_1$? Jul 26, 2022 at 11:09
• @Papayapap, it could be interpreted as the difference in the "effect" of $D$ between two observations that differ by 1 in terms of $X_1$. Jul 26, 2022 at 11:31