Given a model:
$$ y = \beta_0 + \beta_1 \cdot f + u $$
Where $f$ is dummy $=1$ if female and $0$ otherwise, y is height in cm. The sample size is $n_{female}=n_{male}=100 \rightarrow 200$ in total. Further $\bar{y}_{male} = 175$ and $\bar{y}_{female}=165$. Calculate the estimates of parameters.
My attempt:
Using the well know formula:
$$ \boldsymbol{\hat{\beta}} = (\boldsymbol{X}'\boldsymbol{X})^{-1} \boldsymbol{X}'\boldsymbol{y} $$ I get: $$ \begin{bmatrix} 200 & 100 \\ 100 & 100 \\ \end{bmatrix} ^{-1} \begin{bmatrix} 170 \cdot 200 \\ 165 \cdot 200 \end{bmatrix} $$
First the elements in $(\boldsymbol{X}'\boldsymbol{X})^{-1}$, since $X$ is just a bunch of one's, there are 100 female's in the sample and there are 200 males and females in total. For $\boldsymbol{X}'\boldsymbol{y}$, the first element is the "grand mean" of 170, and the second is the just the sample mean of height for females. Both are scaled by 200, since I did not "down-scale" $(\boldsymbol{X}'\boldsymbol{X})^{-1}$.
Is the correct? I ask, because the solution (when multiplying) results in some (very) odd numbers.