Consider a simple linear model:
$Y = \beta_1 + \beta_2 MALE + u$
where $MALE$ is a dummy variable. $MALE = 0$ if female, $MALE = 1$ if male.
A model is fitted:
$\hat{Y} = \hat{\beta_1} + \hat{\beta_2} MALE$
$\bar{Y_F}$ and $\bar{Y_M}$ are the sample means of $Y$ for females and males respectively.
Prove that:
$\hat{\beta_1} = \bar{Y_F}$, $\hat{\beta_2} = \bar{Y_M} - \bar{Y_F}$
If the points are plotted in a scatter block, there will be two vertical clusters of points at $MALE = 0$ and $MALE = 1$, as shown:
It seems intuitively obvious that the total residual sum of squares ($RSS$) is minimized by minimizing the $RSS$ separately for the female and male points. This is achieved by fitting a point at the mean of these points, $\bar{Y_F}$ and $\bar{Y_M}$. Fitting a line between these point yields the correct values for $\hat{\beta_1}$ and $\hat{\beta_2}$.
I wish to prove this algebraically.