Why do you divide by n-1 to find sample variance? Linear regression

#1
Okay I have very limited knowledge on statistics but I'm wondering why the hell you divide the numerator in the sample variance formula by n-1. I've read so much on it and I don't understand. Some have said that because you are using the sample mean you're taking a degree of freedom away therefore you divide by n - 1.. <( obviously you can see my lack of statistical knowledge) But that makes no sense to me. It doesn't really make me understand why...
 

Dragan

Super Moderator
#3
It is because you have a one estimate (XBar) of one parameter in the computation of the sample variance for a single set of data - so your degrees of freedom (df) would be N-1. More generally, for a sum of squares, the general rule is: df = N minus the # of parameter estimates. An example would be a regression model with one predictor. In this case you have two estimates (b_0, b_1) of two parameters (Beta_0, Beta_1) and thus, your df to compute the Mean Squares for Error would be SS(error) divided by N - 2.
 
Last edited: