[Math] Computing SSREG and SSRES (Regression)

regression

SSREG is calculated with $\sum_{i=1}^{n} (\hat Y_i – \bar{Y})^2$ which is the regression sum of squares

SSRES is calculated with $\sum_{i=1}^{n} ( Y_i – \hat Y_i)^2$ which is the residual sum of squares

If we are given

$$\sum_{i=1}^{n} X_i = 323.02, \sum_{i=1}^{n} Y_i = 333.15, \sum_{i=1}
^{n} X_i^2 = 1021.487, \hat\beta_0 = 1.097, \hat\beta_1 = 0.674 $$

I cant seem to find relevant formulas to help me compute it with given info the best I found was

$SSREG = \hat\beta^2_{1} \sum_{i=1}^{n} (X_i – \bar{X})^2 $

enter image description here

Is there an easier one?

Best Answer

You should be given the sample size $n$, then For the SSReg you are right, you have all its components, just plug it in the formula $$ SSreg = \hat{\beta}_1^2(\sum X_i^2 -n \bar{X}_n^2)=0.0674^2(1021.487 - 323.02^2/n ) $$ and $$ SSres=SST-SSreg = \sum Y_i^2-n \bar{Y}_n^2-SSreg $$ where for the SST you need $\bar{Y}_n$ that you can derive from $$ \hat{\beta}_0=\bar{Y}_n-\bar{X}_n\hat{\beta}_1. $$