# MSE denominator

#### Trichmond

##### New member
I am confused regarding how to calculate the formula for MSE (mean squared error) in a forecast. I was taught that the formula is SSE/n-p-1 (with n being the number of observations and p the number of independent variables).

I was assigned a homework problem and used the MSE from the ANOVA table that Excel generated for a regression. It was four years of sales data and we had to use Excel to do a regression with dummy variables for the seasonality.

When the professor went over it, he indicated that technically it should have been just "n" in the denominator, but he would accept "n-p-1". He also indicated that other statistics software would have calculated the MSE using the technically correct "n" in the denominator.

I just don't understand the whole n versus n-p-1 issue and when it is appropriate to use one or the other. As most material I see uses n-p-1, I know it has to be right sometimes? And Excel generates it based on that?

I hoped that made some sense.

Any help would GREATLY be appreciated and help relieve a statistics induced headache.

Thank You,

Tim

#### tkhunny

##### Moderator
Staff member
One technical point: MSE/n-p-1 is NOT the same as SSE/(n-p-1). Remeber your algebra (q.v. Order of Operations)

Do you have an MSR with a denominator? What is the denominator for your corresponding MSR? They should make sense together.

Let's think about the implications. Since p > 0, n-p-1 < n, thus 1/(n-p-1) > 1/n and we have increased our MSE. Is that necessarily a bad thing?

#### Trichmond

##### New member
Sorry, meant SSE/(n-p-1).

I understand that using n-p-1 will make the MSE larger, but that doesn't clarify why I was told that "n" as the denominator is technically correct and that the statistical software programs will produce the MSE value using just "n".

#### tkhunny

##### Moderator
Staff member
[HR][/HR]You did not respond to the middle comment.

#### Trichmond

##### New member
I guess I'm confused as to how the calculation of the MSR would impact the calculation of the MSE? I know the F statistic could be impacted, but I am concerned with calculating the MSE?