$((n-K)s^2)/\sigma^2$ what is this in terms of matrix linear regression?

402 Views Asked by At

$$ \frac{(n-K)s^2}{\sigma^2} $$ what is this in terms of matrix linear regression? Has Chi Squared Distribution with (n-K) df

1

There are 1 best solutions below

2
On

I don't know what you mean by "matrix" linear regression, and your question isn't all that clear. However, suppose you're doing multiple linear regression with $K$ predictors (including the constant predictor) and $n$ cases.

Suppose the errors (not to be confused with the (observable) residuals) all are independent and each is distributed as $N(0,\sigma^2)$. Then $$ s^2 = \frac{\text{sum of squares of residuals}}{n-K} $$ is an unbiased estimator of $\sigma^2$, and $$ \frac{(n-K)s^2}{\sigma^2} \sim \chi^2_{n-K}. $$

The notation here is quite conventional, except that I don't recall having seen a capital $K$ used for this before.

PS: Alright, let's say our model is $$ Y = \mathbf X\beta + \varepsilon $$ where $Y\in\mathbb R^{n\times 1}$, $\mathbf X \in \mathbb R^{n\times K}$, $\beta\in\mathbb R^{K\times 1}$, and $\varepsilon \sim N_n(0\in\mathbb R^n, \mathbf I \in\mathbb R^{n\times n})$. We can observe $Y$ and $\mathbf X$ and we want to estimate $\beta$ by least squares.

The estimate is $\widehat\beta = (\mathbf X^T \mathbf X)^{-1} \mathbf X^T Y$. The vector of residuals is $Y-\mathbf X\widehat\beta = (\mathbf I - \mathbf X(\mathbf X^T\mathbf X)^{-1}\mathbf X)Y = (\mathbf I - \mathbf H)Y$. The matrix $\mathbf{I-H}$ is symmetric and idempotent, so one has

$$\|(\mathbf{I-H})Y\|^2 = \|Y^T(\mathbf{I-H})Y\|^2 = \text{sum of squares of residuals}.$$

Then $$ \frac{\|Y^T(\mathbf{I-H})Y\|^2}{\sigma^2} = \frac{(n-K)s^2}{\sigma^2} \sim \chi^2_{n-K}. $$