Generally speaking, can RMSE be smaller than MAE?

I am calculating RMSE and MAE for my results. In two out of five methods, the RMSE is smaller than MAE. Note that I am using the same data, the same script, and the same code to calculate RMSE and MAE. The only difference is the algorithm to create the models.

I have been over my script several times and everything is ok with the code.

Thank you.

  • $\begingroup$ Generally speaking, yes. It depends on algorithms result. Different algorithms - different results. And check your data for outliers, maybe they effect on this measures. $\endgroup$ – ooolllooo Oct 12 '17 at 11:55
  • $\begingroup$ Can you expand a bit here by editing to say under what circumstances they might vary? $\endgroup$ – mdewey Oct 12 '17 at 12:21
  • $\begingroup$ For example, true values is 1,2,3 $\endgroup$ – ooolllooo Oct 12 '17 at 12:39
  • $\begingroup$ Does this answer stats.stackexchange.com/questions/59493/… help you move further with your problem? $\endgroup$ – mdewey Oct 12 '17 at 12:43
  • $\begingroup$ No, RMSE is always greater or equal MAE. Take a look at this article and this. $\endgroup$ – lenhhoxung Apr 20 at 6:22

Both metrics are defined in terms of residuals

$$ r_i = y_i - \hat y_i $$

i.e. the difference between true values $y_i$ and predicted values $\hat y_i$. RMSE is defined as $\sqrt{1/n \sum_{i=1}^n r_i^2}$ and MAE as $1/n \sum_{i=1}^n |r_i|$. So answer to your question reduces to asking if squared values can be smaller then absolute values? To answer this yourself, plot both functions.

Squared vs absolute values

As you can see, for $x < 1$ it is true that $x^2 < |x|$, for $x = 1$, $x^2 = |x|$ and for $x > 1$, $x^2 > |x|$. So you can easily imagine such combination of values that taken together and averaged leads to smaller MAE then RMSE. Here you can find simple interpretation of such case.

  • $\begingroup$ This illustration is not correct because in RMSE, you take the average of the SSE and then calculate the root. See my answer below. $\endgroup$ – lenhhoxung Apr 20 at 6:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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