How to derive a regression formula In this paper: http://www.nber.org/papers/w19774.pdf, (ungated version here) the author spells out the following regression (equation 1 in the paper):
$s_{ij} = \alpha + \beta \bar{s_j} + \epsilon_{ij},$
where $i$ is individual, $j$ is school, $s_{ij}$ is outcome for individual $i$ in school $j$, and $\bar{s_j}$ is the average outcome for individuals at school $j$.  Note that $i$ is included in the average for his/her school, $\bar{s_j}$.
How does the author come up with the left-hand side expression for $\hat{\beta}$ (reproduced below)?  Also, what does $n_j$ mean?  And why does this equal 1?  I feel like more steps would help me grasp this better.
$\frac{\sum_j \sum_i s_{ij} (\bar{s_j} - \bar{s})}{\sum_j n_j (\bar{s_j} - \bar{s})^2} = \frac{\sum_j (\bar{s_j} - \bar{s})(n_j \bar{s_j})}{\sum_j n_j( \bar{s_j} - \bar{s})^2} = 1 $
Note that page 195 of Mostly Harmless Econometrics has something very similar.
 A: As whuber pointed out, Angrist is just applying the formula for the OLS estimator to the above stated regression equation. From an interpretation point, regressing
$$s_{ij} = \alpha + \beta \overline{s}_j + \epsilon_{ij}$$
is the same as if you were to first regress
$$s_{ij} = a + \sum_j \delta_j D_j + e_{ij}$$
where $D_j$ are dummies for each school, and then you use the fitted values from this regression in
$$s_{ij} = \alpha + \beta \widehat{s}_{ij} + \epsilon_{ij}$$
To convince yourself, you could try the following code which is written for Stata but the logic works for your preferred statistical package and example data set:
// insheet an example data set
webuse nlswork

// generate the group-average of earnings by race
egen av_wage = mean(ln_wage), by(race)

// regress individual wages on the group wages
reg ln_wage av_wage

// now do the same thing with the dummy variable method described here
reg ln_wage i.race
predict wage_hat, xb

reg ln_wage wage_hat

The regression coefficients will not be exactly 1 due to the rounding errors that computers make but the logic goes through nonetheless.
Another way to see the tautological nature of this regression is given in the published version of Angrist's paper. Assume you have a mean zero random variable $y$, if you take the mean of $y$ conditional on another random variable $z$, i.e. $E(y|z) = \mu_{y|z}$, then the regression of $y$ on this group-mean variable must give a coefficient of one. Using a formulation of the OLS estimator (maybe one that you find more familiar) the corresponding regression coefficient of $y$ on $\mu_{y|z}$ is
$$\beta = \frac{E(y\mu_{y|z})}{\text{Var}(\mu_{y|z})}$$
Then take the numerator, apply the law of iterating expectations:
$$
\begin{align}
E(y\mu_{y|z}) &= E(E(y|z,\mu_{y|z})\cdot \mu_{y|z}) \newline
&= E(E(y|z)\cdot \mu_{y|z}) \newline
&= E(\mu_{y|z}^2) \newline
&= \text{Var}(\mu_{y|z})
\end{align}
$$
Substituting back into the formula for the OLS estiator you get
$$\beta = \frac{E(y\mu_{y|z})}{\text{Var}(\mu_{y|z})} = \frac{\text{Var}(\mu_{y|z})}{\text{Var}(\mu_{y|z})} = 1$$
