<p>Consider the standard linear regression model: $y_i = \alpha + \beta D_i + e_i$ where the coefficients are defined by linear projections and $D_i$ is a dummy variable. In the population, the coefficients are given by:</p>

<p>$$\alpha = E[y_i \mid D_i =0] \ \text{and} \ \beta = E[y_i \mid D_i = 1] - E[y_i \mid D_i =0]$$ </p>

<p>Using OLS to estimate the coefficients, we get:</p>

<p>$$\widehat{\alpha} = \overline{y}_{D_i=0} $$</p>

<p>$$\widehat{\beta} = \overline{y}_{D_i=1}-\overline{y}_{D_i=0} $$</p>

<p>In other words, $\widehat{\alpha}$ is just the sample mean of $y_i$ in the subsample with $D_i=0$ and $\widehat{\beta}$ is the difference in sample means of the two groups. The expressions seem very obvious because they are just sample versions of the population, but my question is, how can we arrive at the above coefficient estimates by using the standard OLS formulas? That is using:</p>

<p>$$\widehat{\alpha} = \overline{y} - \overline{D}\widehat{\beta} \ \ \text{and} \ \ \widehat{\beta} = \frac{\sum_{i=1}^{N}(D_i - \overline{D})(y_i - \overline{y})}{\sum_{i=1}^{N}(D_i - \overline{D})^2}$$ </p>

<econometrics><regression>
Dummy variable regressor OLS coefficient formula
elbarto
# Dummy variable regressor OLS coefficient formula

(Asked by: username_0 on 2018-07-31)

Consider the standard linear regression model: $y\_i = \alpha + \beta D\_i + e\_i$ where the coefficients are defined by linear projections and $D\_i$ is a dummy variable. In the population, the coefficients are given by:

$$\alpha = E[y\_i \mid D\_i =0] \ \text{and} \ \beta = E[y\_i \mid D\_i = 1] - E[y\_i \mid D\_i =0]$$

Using OLS to estimate the coefficients, we get:

$$\widehat{\alpha} = \overline{y}\_{D\_i=0} $$

$$\widehat{\beta} = \overline{y}\_{D\_i=1}-\overline{y}\_{D\_i=0} $$

In other words, $\widehat{\alpha}$ is just the sample mean of $y\_i$ in the subsample with $D\_i=0$ and $\widehat{\beta}$ is the difference in sample means of the two groups. The expressions seem very obvious because they are just sample versions of the population, but my question is, how can we arrive at the above coefficient estimates by using the standard OLS formulas? That is using:

$$\widehat{\alpha} = \overline{y} - \overline{D}\widehat{\beta} \ \ \text{and} \ \ \widehat{\beta} = \frac{\sum\_{i=1}^{N}(D\_i - \overline{D})(y\_i - \overline{y})}{\sum\_{i=1}^{N}(D\_i - \overline{D})^2}$$

**Tags:** econometrics, regression


---

## 0 answers

