# Dummy variable notation

Consider the following linear regression model that only consists of dummy variables:$$Y_{i}=\beta_{0}+\beta_{1}D_{1i}+\beta_{2}D_{2i}+\epsilon_{i}$$ whereby $i$ denotes individual, $D_{1i}$ is an indicator that switches on if $i$ is in treatment 1, and $D_{21}$ switches on if the individual is in treatment 2. The reference group is the control group. We know that

$${\beta_{1}}=\mathbb{E}[Y_{i}|D_{1i}=1]-\mathbb{E}[Y_{i}|Control].$$

I am a bit confused regarding notation here. Can we leave it as above or should we be more concrete:

$${\beta_{1}}=\mathbb{E}[Y_{i}|D_{1i}=1,D_{2i}=0]-\mathbb{E}[Y_{i}|D_{1i}=0,D_{2i}=0]?$$

That is, do we need to also condition on the second treatment here? Or is it already assumed because the treatments are mutually exclusive?

• Your notation is wrong. You write $\hat{\beta}_1 = \dots$, but I think you mean $\beta_1$. Putting a hat would indicate an estimate, and not the truth. – Greenparker Feb 29 '16 at 17:30

Your model is $$Y_i = \beta_0 + \beta_1 D_{1i} + \beta_2 D_{2i} + \epsilon.$$

The expectation in this next step is always taken conditioned on all the predictors. So

$$E(Y_i| D_{1i} = d_1, D_{2i} = d_2) = \beta_0 + \beta_1d_1 + \beta_2 d_2.$$

Remember that when inference is made on the regression coefficients, you need to keep all other predictors constant. To write down the equation with a focus on $\beta_1$, we let $d_1 = 0$ and $1$.

$$\beta_1 = E(Y_i| D_{1i} = 1, D_{2i} = d_2) - E(Y_i|D_{1i} = 0, D_{2i} = d_2).$$

So you condition on all predictors.

• Thanks, but in the context of dummy variables, it is redundant on condition on the other variable taking on a value of 0 as these are mutually exclusive categories. More specifically, $E[Y|D_{1i}=1]=E[Y_{i}|D_{1i}=1,D_{2i}=0]$. In other words, conditioning on an individual being a man is equivalent to conditioning on an individual being a man and not a woman. Right? – ChinG Feb 29 '16 at 17:40
• From your question, it seemed like there were two categorical variables. In any case, what I wrote down is still correct. You can then probably go ahead and use your argument to write it only in terms of $D_{i1}$. – Greenparker Feb 29 '16 at 17:44