Let RSS = Residual sum of squares $ = \sum (y_i - \hat{y}_i)^2$. Without proof, $\frac{RSS}{\sigma^2} \sim \chi^2_{n-2}$. I do not quite understand why the DoF is $n-2.$ Could someone explain?
Asked
Active
Viewed 1,804 times
1
-
https://stats.stackexchange.com/questions/258461/proof-that-f-statistic-follows-f-distribution/258476#258476 contains relevant discussion. – Christoph Hanck Dec 31 '18 at 17:31
-
1Are we to assume that $\hat{y}_i=\hat{\beta}_0+\hat{\beta}_1X_1 + e_i$? Only if you have a model where you have to estimate two parameters (i.e. $\beta_0$ and $\beta_1$) will you have $n-2$ degrees of freedom. – StatsStudent Dec 31 '18 at 17:47
-
@Christoph I believe your reference might be a little misleading. This is purely a question about the distribution of $RSS;$ there is no statistic in evidence that has an $F$ ratio distribution. – whuber Dec 31 '18 at 18:39
-
This search uncovers several answers: https://stats.stackexchange.com/search?q=n-2+chi+square+regression+answers%3A1+score%3A1. – whuber Dec 31 '18 at 18:44
-
1@whuber, the reference was just one that quickly came to my mind as I had worked on it - the others surely are closer to the point of the question. – Christoph Hanck Jan 02 '19 at 08:36
1 Answers
1
The "intuition" is that to estimate the RSS you need to first estimate the means for each point $\hat y_i$, there goes one DoF. Then to do inference, you're estimating the ratio $RSS/\sigma^2$, where the variance also has to be estimated, usually, so it takes away another DoF.
Actually, in the regression you have $\hat y_i=X_i\hat\beta$, so if you have $k$ bona fide variables the DoF is really $n-k-2$

Aksakal
- 55,939
- 5
- 90
- 176
-
I think this answer misses the mark. The estimation of the means of the conditional responses already requires two parameters: an intercept and slope. In the question, $\sigma^2$ does not refer to an estimate, for otherwise the correct distribution to use would be an $F$ ratio distribution rather than the $\chi^2.$ – whuber Dec 31 '18 at 18:37