This was posted as a practice proof for a regressions class. I've worked through it from the perspective of $SSE = SST - SSR$, but I cannot reduce to the given equation. There were other mistakes made in this practice homework, so it's possible this problem is missing something, but I don't want to pass off my inability to prove the equation on the practice problem's design.
We know that $E(\sum e_i^2) = E\sum (y_i - \hat y_i)^2$, but when factoring out the values, this side does not equal the right side of the equation. I thought to start from $SSE = SST - SSR$ and reduce that initial setup—$E\sum (y_i - \hat y_i)^2 = E\sum (y_i - \bar y)^2 - E\sum (\hat y_i - \bar y)^2$—but again I was unable to reduce the given values down to the initial equation given in the title. As I reduce it, there are leftover $2y_i \hat y_i$ and $2\hat y_i \bar y_i$, which I can't remove. I appreciate any insight into what I'm missing (or what the initial question is missing).
In general it holds for simple and multi linear regression. Also, the expectations are not required.
Well writing it in matrix form \begin{equation} Y = X\beta +\epsilon \end{equation} where $X$ is the $X \times 2$ matrix, then \begin{equation} \sum e_i^2 = e^T e \end{equation} where \begin{equation} e = Y - \hat{Y} \end{equation} and \begin{equation} \hat{Y} = (X^T X)^{-1}X^T Y \tag{1} \end{equation} So \begin{equation} \sum e_i^2 = (Y - \hat{Y})^T(Y - \hat{Y}) = Y^TY - 2\hat{Y}^TY + \hat{Y}^T\hat{Y} \end{equation} It's easy to see that $\sum_i y_i = Y^TY$ and $\hat{Y}^T\hat{Y} = \sum_i \hat{y}_i$, but \begin{equation} \sum \hat{y}_iy_i = \hat{Y}^TY= ((X^TX)^{-1}X^TY)^T Y = Y^T X(X^TX)^{-1}\hat{Y} \tag{2} \end{equation} But equation $(1)$ tells us that $X^T Y = (X^T X)\hat{Y}$ or \begin{equation} Y^T X = \hat{Y}^T(X^T X) \tag{3} \end{equation} Replacing $(3)$ in $(2)$ you get \begin{equation} \sum_i \hat{y}_iy_i =\hat{Y}^T(X^T X) (X^TX)^{-1}\hat{Y} =\hat{Y}^T \hat{Y} = \sum_i \hat{y}_i^2 \tag{4} \end{equation} Now, expanding $\sum e_i^2$, we get \begin{equation} \sum_i e_i^2 = \sum y_i^2 - 2 \sum y_i\hat{y}_i + \sum \hat{y}_i^2 \tag{5} \end{equation} using equation $(4)$ in $(5)$, we get \begin{equation} \sum_i e_i^2 = \sum y_i^2 - 2 \sum \hat{y}_i^2 + \sum \hat{y}_i^2 \end{equation} that is