# What is “estimated unbiased variance of the error term”?

Disclosure: This is a homework question.

I have fit a multiple linear regression model in eviews, and I am asked to calculate "estimated unbiased variance of the error term, i.e., $\hat\sigma^2$".

What confused me was "estimated unbiased" part.

I have done a Google search for exact term "estimated unbiased variance of the error term". However, I didn't get an exact result.

My approach was to calculate variance of residuals through genr varresid = @var(resid) (eviews command). However, I am not sure if this is the number I am trying to get.

So, my question is, what is the formula for the estimated unbiased variance of the error term?

• What exactly do you mean by "multivariate... regression"? As the tag wiki excerpt notes (mouseover the tag [multivariate-regression] to see), it usually stands for a regression model where there is >1 response variable, not necessarily >1 predictor variable (although there may be that as well). Is that how you are using the term, or do you mean a model w/ >1 predictor variable but only 1 response variable? – gung - Reinstate Monica Nov 17 '13 at 18:47
• @gung I have a model with more than one explanatory variable. I guess I have used wrong tag. What is the correct tag for it? – yasar Nov 17 '13 at 18:56
• If you have >1 explanatory variable & only 1 response variable, most people will call it multiple regression. It's a subtle difference, & many people (unfortunately, IMO) use the terms in less common ways. I tweaked the phrasing & changed the tag for you. – gung - Reinstate Monica Nov 17 '13 at 18:59

The obvious estimate of that (and the maximum likelihood estimate) is the average squared residual, but the problem is that the fitted values are closer to the data than the true line and on average this value is too small; in particular it turns out to be $E(s^2_n) = \frac{n-p}{n}\sigma^2$, where here $p$ is the total number of terms in the regression including the intercept, if any.
So just as with sample variances in univariate samples, reducing the denominator can make the value correct on average; that is, $s^2 = \frac{n}{n-p}s^2_n = \frac{RSS}{n-p}=\frac{1}{n-p}\sum_{i=1}^n(y_i-\hat y_i)^2$. (Note that RSS there stands for 'residual sum of squares'; sometimes SSE - sums of squares of error - is used instead).
If your eviews @var command calculates the usual $n-1$ denominator variance then it won't be the required unbiased estimate and you'll need to scale it.