# Can RMSE be smaller than MAE?

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.

• Generally speaking, yes. It depends on algorithms result. Different algorithms - different results. And check your data for outliers, maybe they effect on this measures. – ooolllooo Oct 12 '17 at 11:55
• Can you expand a bit here by editing to say under what circumstances they might vary? – mdewey Oct 12 '17 at 12:21
• For example, true values is 1,2,3 – ooolllooo Oct 12 '17 at 12:39
$$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.
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.