t-test with df=n-2 for regression coefficients?

this is what Kaplan says! yet it confuses me because in the reading for the t-distribution i learned that the t-distribution is defined by df=n-1 for samples? what gives? tx

This is the differnece between calculating the t-test for a statistic (e.g. mean) and calculating the regression line coefficient. Degrees of freedom for regression coefficients are calculated using the ANOVA table where degrees of freedom are n-(k+1) where k is the number of independant variables. So for a simple regression analysis one independant variable k=1 and dergrees of freedeom are n-2, n-(1+1). Hope this helps