Let a simple linear regression model be:

$\displaystyle Y_i=\alpha +\beta x_i + e_i \ \ \ (i=1, \cdots ,n)$

$\displaystyle e_i\sim N(0,\sigma ^{2})$

Least squares estimator of $\displaystyle \alpha , \beta$ are:

$\displaystyle \hat{\alpha }=\bar{Y}-\hat{\beta}\bar{x}$, $\displaystyle \hat{\beta}=\frac{S_{(xY)}}{S_{(xx)}}$

($\displaystyle S_{(XY)}$ is defined as $\displaystyle \sum_{i=1}^{n}(X_i-\bar{X})(Y_i-\bar{Y})$)

$\displaystyle \hat{e_i}$ is defined as $\displaystyle Y_i-(\hat{\alpha}+\hat{\beta}x_i)$

For error sum of squares $\displaystyle SSE=\sum_{i=1}^{n}\hat{e_i}^{2}$ prove the following:

$\displaystyle E(SSE)=(n-2)\sigma^{2}$

Can anyone please help me out on this? Thank you.