Why are degrees of freedom calculated while calculating the residual standard error in linear regression

degrees_of_freedom

#1

Hello,

While trying to understand linear regression output as the one below:

I want to know why the part marked in red is necessary?Is it something related to population/sample etc.
In this case the data had 3333 rows and since number of columns is the DF = 3330.
In short I want to know why we need this degrees of freedom thing??


#2

Hi @pagal_guy,

Yes you are right this has to do with population/sample thing. Model assumes that this is not the total population and you are training on a sample of data. So the calculation of calculating Standard error gets changed based on the degree of freedom. Your DOF in this case is = 3333 rows - 3 dimensions(3 columns) = 3330. You can refer to this book for more clarification.

Hope this helps.

Regards,
Aayush