# Equivalence of a slope coefficient in a regression using individual and aggregate data

I want to compare the coefficients of the two linear regressions:

$$\begin{array}{c} y_{ij} &=& \beta_0 + \beta_1 X_{j} + u_{ij} \\ y_{j} &=& \alpha_0 + \alpha_1 X_{j} + u_{j} \\ y_{j} &=& \frac{1}{N_j} \sum_{i=1} ^ {N_j} y_{ij} \end{array}$$

so that the second equation differs only by using the mean of group $j$ instead of individual observations $y_{ij}$ as the dependent variable. Is there an easy way to show that $\hat{\beta}_1 = \hat{\alpha}_1$, where hat denotes OLS estimate?

• $X_j$ is the same for all $i$? And I suspect you want to show that the least squares estimates of $\beta_1$ and $\alpha_1$ are equal, not the true coefficients? – mpiktas Jul 1 '13 at 13:52
• yes to first and yes to second question. – Florian Oswald Jul 1 '13 at 14:22

By definition, $\beta_1= S_{X_j Y_{ij}} / S_{X_j}$ and $\alpha_1= S_{X_j Y_{j}} / S_{X_j}$. Then $S_{X_j Y_{ij}} = E_{ij}[ (X_j - \overline{X}) (Y_{ij} - \overline{Y_{ij}}) ] = E_{j}[ (X_j - \overline{X}) (E_i(Y_{ij} - \overline{Y_{j}})) ] = E_{j}[ (X_j - \overline{X}) (Y_{j} - \overline{Y}) ] = S_{X_j Y_{j}}$. [In the second equality, I used your third equation.]