Could anyone show me how to prove the following:
$$SS_{reg} = \sum_{i = 1}^{n}(\hat{y}_{i} - \bar{y})^{2} = \dfrac{\sum_{i = 1}^{n}[(x_{i} - \bar{x}) (y_{i} - \bar{y})]^{2}}{\sum_{i = 1}^{n}(x_{i} - \bar{x})^{2}}$$
I am unsure about what context to provide but the proof my textbook has is a little confusing, so I was hoping someone else had a better way of doing this.
To provide a little more context, the question is about simple linear regression model with OLS estimators
Comment:
In MSE the context, unlike in Cross Validated, is not trivial, so it is worth to mention that you are talking about the simple linear regression model with OLS estimators.
Answer:
Assuming $y_i = \beta_0 + \beta_1 x_i + \epsilon_i$, $i = 1,...,n$. The OLS estimator of $\beta_1$ and $\beta_0$ are $$ \hat{\beta}_1 = \frac{\sum (x_i - \bar{x}_n)(y_i - \bar{y}_n)}{\sum (x_i - \bar{x}_n)^2}, \quad \hat{\beta}_0 = \bar{y}_n - \hat{\beta}_1 \bar{x}_n, $$ thus replace in $SSreg$ the $\hat{y}_i$ with $\bar{y}_n - \hat{\beta}_1 \bar{x}_n + \hat{\beta}_1x_i$ and show that $$ SSreg = \hat{\beta}_1^2\sum(x_i - \bar{x}_n)^2, $$ now replace $\hat{\beta}_1$ with its explicit form and cancel out the $\sum(x_i - \bar{x}_n)^2$ to get the answer.