Multiplication by centering matrix

754 Views Asked by At

Let $X_1, X_2, ... , X_n$ be a random sample from some population. Define $S^2 = \frac{1}{n-1} \sum_{i=1}^{n}(X_i - \bar{X})^2 $

Let $\mathbf{X} = [X_1 X_2... X_n]^T$ and C be the n-by-n centering matrix https://en.wikipedia.org/wiki/Centering_matrix.

Show that $\frac{1}{n-1}\mathbf{X}^T C \mathbf{X} = S^2$

The product $C \mathbf{X}$ gives the n-by-1 vector with components $(C \mathbf{X})_i = X_i - \bar{X}$ like expected. However multiplying this by $\mathbf{X}^T$ I obtain $\sum_{i=1}^n X_i(X_i - \bar{X}) \neq S^2$.

1

There are 1 best solutions below

0
On BEST ANSWER

you should observe that your centering matrix $C$ is given by $C:= I - \frac{1}{n}\mathbf {11}^T$ so $C$ is symmetric and idempotent. Applying this and associativity gives

$s^2 =\frac{1}{n-1}\cdot\mathbf{x}^T C \mathbf{x} = \frac{1}{n-1}\big(\mathbf{x}^T C^T\big)\big(C \mathbf{x}\big) = \frac{1}{n-1}\big(C\mathbf{x}\big)^T\big(C \mathbf{x}\big)= \frac{1}{n-1}\cdot \sum_{i=1}^{n}(X_i - \bar{X})^2$

where the end makes use of the fact that you already calculated $C\mathbf x$