Regarding a univariate OLS regression with a single categorical predictor (coded 0,1).
I am wrestling with the proof that $$t =\frac{b_1}{s(b_1)} $$
starting from the basic OLS estimator for the slope which is $$b_1= \frac{\sum (X_i - \bar{X})Y_i}{\sum(X_i - \bar{X})^2}. $$
I know that the first step is to show that the denominator $\sum(X_i - \bar{X})^2$ is equal to
$$\frac{n_1n_0}{n} $$
where $n_0$ and $n_1$ are the groups A and B where $X_i = 0$ and $1$ respectively.
I just can't get there, and know my partial summation algebra is lacking.
I am comfortable that $\sum(X_i - \bar{x})^2 = \sum(X_A - \bar{x})^2 + \sum(X_B - \bar{x})^2$ and then expanding each of these to the form $\sum X_i^2 - n\bar{x} ^2$ but can't get further than this:
$$\sum_{i=1}^{n_0} X_i^2 - n_0\bar{x} ^2 + \sum_{i=1}^{n_1} X_i^2 - n_1\bar{x} ^2.$$
I think the next step hinges on the fact that for the zero group $\sum X_i^2 = 0$ and for the 1 group $\sum X_i^2 = 1$.
Any advice on what I am missing to move forward here? Or if anyone can point me to a complete proof I'd be really grateful.