14

The degrees of freedom in a multiple regression equals $N-k-1$, where $k$ is the number of variables.

Does $k$ include the response variable (i.e., $Y$)? For example, in the model $Y = B_0 + B_1X_1 + B_2X_2$, then does $k = 3$ (i.e., 1 df each for $Y$, $X_1$, & $X_2$)?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
dorothy
  • 585
  • 3
  • 7
  • 16

1 Answers1

12

It's the number of predictor (x) variables; the additional -1 in the formula is for the intercept - it's an additional predictor. The Y doesn't count. So in your example $k=2$ and the error df is $N-3$

Glen_b
  • 257,508
  • 32
  • 553
  • 939
  • 6
    Another (ultimately equivalent) way to think about this is that you use 1 df for each parameter estimate (ie, $\hat\beta$), plus 1 df for the mean of the response (ie, $\bar y$), since the intercept is determined once you have $({\bf\bar x}, \bar y)$ and the slopes. – gung - Reinstate Monica Feb 22 '14 at 03:35