I am doing linear regression using the Boston Housing data set, and the effect of applying $\log(y)$ has a huge impact on the MSE. Failing to do it gives MSE=34.94 while if $y$ is transformed, it gives 0.05.


1 Answer 1


The MSE is sensitive to scale. To see this, $$ MSE = \frac{1}{N}\sum_{i=1}^{N} (y_i - \hat{y}_i)^2 $$ Let's suppose your outcome ranges from $[1,99]$ with mean at $50$, and let's pretend your model is just a "naive" estimate where the estimates are just $\hat{y}_i = 50$. The MSE is then 816.66.

Now if you log-transformed, the outcome ranges from $[0,4.595]$ with mean 3.63. Again we use a simple model where the estimates are just the sample mean. The MSE is then 0.851.

Note that the fit of the model is not any better, the only thing that's changed is the scale of the MSE.

  • $\begingroup$ Hmm I see, so how can we know when a MSE value is a good one? $\endgroup$
    – Caterina
    May 2, 2022 at 22:59
  • 1
    $\begingroup$ How would you define "good"? If you are comparing two models, then sure the one with the lower MSE is a "better" fit. But for diagnostics (since you are using a linear model) you should more importantly check the residuals and possibly metrics such as R-squared. $\endgroup$
    – Adam
    May 3, 2022 at 3:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.