Searched quite a bit in the forum but cant find this. In Wikipedia the derivation of the regression coefficient for simple linear regression is skipped and points to a book that isn't freely available.
Instead they just present the results, but I don't find any somewhat friendly derivation, of the steps that go from $\beta_0$, $\beta_1$ to $r_{xy}$.
How is the regression coefficient derived ?
I.e Starting with the first equality for $\beta$ below how do you get to the last definition of $r_{xy}$ ?
Relevant images linked above
I get the steps from the bare linear formula to the one before $r_{xy}$
And this is the definition:
There is also a Wikipedia page for the derivations of quantities but only involved in the least squares error, and does not include the regression coefficient.


\begin{align} \beta &= \frac{\mathrm{Cov}(X, Y)}{\mathrm{Var}(X)} \\ &= \frac{\sum_i (x_i - \bar{x})\, (y_i - \bar{y})}{\sum_i (x_i-\bar{x})^2} \end{align}
$$ \mathrm{Var}(X) = n\,(\overline{x^2} - \bar{x}^2)$$
\begin{align} \mathrm{Cov}(X,Y) = n\,(\overline{x\,y} - \bar{x}\bar{y}) \end{align}
\begin{align} \beta = \frac{\overline{x\,y} - \bar{x}\bar{y}}{\overline{x^2} - \bar{x}^2} \end{align}
\begin{align} \beta = \left(\frac{\overline{x\,y} - \bar{x}\bar{y}}{\sqrt{(\overline{x^2} - \bar{x}^2)\,(\overline{y^2} - \bar{y}^2)}}\right)\, \frac{S_y}{S_x} \end{align}
Some minor details
Formula for the Variance
\begin{align} \sum_i (x_i-\bar{x})^2 &= (\sum_i x_i^2 - 2\,x_i\,\bar{x}) + n\bar{x}^2 \\ &= n\,(\overline{x^2} - 2 \bar{x}^2) + n\, \bar{x}^2 \\ &= n\,(\overline{x^2} - \bar{x}^2) \\ \end{align}
Formula for the Covariance
\begin{align} \mathrm{Cov}(X,Y) &= \sum_i (x_i - \bar{x})\, (y_i - \bar{y}) \\ &= n\,\overline{x\,y} + n\,\bar{x}\bar{y} - (\sum_i x_i\bar{y} + y_i\bar{x}) \\ &= n\,(\overline{x\,y} - \bar{x}\bar{y}) \end{align}