Squared sum of errors Why does $\mbox{SST} = \mbox{SSR} + \mbox{SSE}$ hold?
It is understandable that $\sqrt{\mbox{SST}} = \sqrt{\mbox{SSR}} + \sqrt{\mbox{SSE}}$ but how can $\mbox{SST} = \mbox{SSR} + \mbox{SSE}$ hold?
These are squared values.
 A: Start with this:
\begin{eqnarray*}
SST & = & \sum_{i=1}^{n}(y_{i}-\bar{y})^{2}\\
 & = & \sum_{i=1}^{n}((y_{i}-\hat{y}_{i})+(\hat{y}_{i}-\bar{y}))^{2}\\
 & = & \underset{SSE}{\underbrace{\sum_{i=1}^{n}(y_{i}-\hat{y}_{i})^{2}}}+\underset{SSR}{\underbrace{\sum_{i=1}^{n}(\hat{y}_{i}-\bar{y})^{2}}}+2\sum_{i=1}^{n}(y_{i}-\bar{y}_{i})(\hat{y}_{i}-\bar{y}).
\end{eqnarray*}
It can be shown that $2\sum_{i=1}^{n}(y_{i}-\bar{y}_{i})(\hat{y}_{i}-\bar{y})=0.$
Lets think about how to do that last step. First note that $\hat{y}_{i}=\hat{\beta}_{0}+\hat{\beta}_{1}x_{i}=\bar{y}+\hat{\beta}_{1}(x_{i}-\bar{x})$
and so $(\hat{y}_{i}-\bar{y})=\hat{\beta}_{1}(x_{i}-\bar{x})$. Furthermore,
we can write $(y_{i}-\hat{y}_{i})=(y_{i}-\bar{y})-\hat{\beta}_{1}(x_{i}-\bar{x}).$
Then
\begin{eqnarray*}
\sum_{i=1}^{n}(y_{i}-\bar{y}_{i})(\hat{y}_{i}-\bar{y}) & = & \hat{\beta}_{1}\sum_{i=1}^{n}(x_{i}-\bar{x})(y_{i}-\bar{y})-\hat{\beta}_{1}^{2}\sum_{i=1}^{n}(x_{i}-\bar{x})^{2}\\
 & = & \left(\dfrac{Q_{xy}}{Q_{xx}}\right)Q_{xy}-\left(\dfrac{Q_{xy}}{Q_{xx}}\right)^{2}Q_{xx}\\
 & = & 0
\end{eqnarray*}
 because $\hat{\beta}_{1}=Q_{xy}/Q_{xx}.$
Also I used the standard sum of square notation, e.g. $Q_{xx}=\sum_{i=1}^{n}(x_{i}-\bar{x})^{2}$
etc
