# Multiple linear regression degrees of freedom

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$)?

• I don't know where you found this quote, but it sure is poorly phrased. – Patrick Coulombe Feb 22 '14 at 3:40

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$
• 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 3:35