1
$\begingroup$

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?

$\endgroup$

marked as duplicate by whuber regression Dec 31 '18 at 18:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ stats.stackexchange.com/questions/258461/… contains relevant discussion. $\endgroup$ – Christoph Hanck Dec 31 '18 at 17:31
  • 1
    $\begingroup$ Are 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. $\endgroup$ – StatsStudent Dec 31 '18 at 17:47
  • $\begingroup$ @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. $\endgroup$ – whuber Dec 31 '18 at 18:39
  • $\begingroup$ This search uncovers several answers: stats.stackexchange.com/…. $\endgroup$ – whuber Dec 31 '18 at 18:44
  • 1
    $\begingroup$ @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. $\endgroup$ – Christoph Hanck Jan 2 at 8:36
1
$\begingroup$

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$

$\endgroup$
  • $\begingroup$ 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.$ $\endgroup$ – whuber Dec 31 '18 at 18:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.