Prove that total sum of squares is given by $y^TB^TBy$

196 Views Asked by At

Given an $n \times 1$ vector of outputs $y$, how does one prove that the total sum of squares $$S_\text{tot}=y^TB^TBy$$ where $B=(I-\vec1(\vec1^T\vec{1})^{-1}\vec{1}^T)$

Further, how does one show that $B$ is symmetric and idempotent?

Note: $\vec{1}$ is the vector of ones and $I$ is the $n \times n$ identity matrix.

1

There are 1 best solutions below

0
On BEST ANSWER
  • For $B$ you have $\left(\vec1^T\vec{1}\right)$ being the $1 \times 1$ matrix with value $n$,
  • so $\vec1\left(\vec1^T\vec{1}\right)^{-1}\vec{1}^T$ is the $n \times n$ matrix with each element value $\frac{1}{n}$
  • so $B=I-\vec1\left(\vec1^T\vec{1}\right)^{-1}\vec{1}^T$ is the $n \times n$ matrix with leading diagonal values $1-\frac1n$ and other values $-\frac{1}n$. This is obviously symmetric
  • To show it is idempotent, you want $B^2=B$ and this is a consequence of $\left(1-\frac1n\right)^2+(n-1)\left(-\frac{1}n\right)^2 =1-\frac1n$ and of $2\left(1-\frac1n\right)\left(-\frac{1}n\right)+(n-2)\left(-\frac{1}n\right)^2 =-\frac{1}n$.
  • So $B^TB=B^2=B$
  • and thus $\vec y^TB^TB\vec y = \vec y^T B\vec y = \vec y^T I \vec y -\vec y^T\vec1\left(\vec1^T\vec{1}\right)^{-1}\vec{1}^T \vec y$
  • where $\vec y^T I \vec y = \sum_i y_i^2$
  • and $\vec y^T\vec1\left(\vec1^T\vec{1}\right)^{-1}\vec{1}^T \vec y = \frac1n \sum_j\sum_k y_j y_k = \frac1n \left(\sum_j y_j\right)^2 = n \bar y^2$
  • so $\vec y^TB^TB\vec y = \sum_i y_i^2 - n \bar y^2 = \sum_i \left(y_i^2 - \bar y^2\right)= \sum_i \left(y_i - \bar y\right)^2$