What does MAPE reward?

In my previous post, I showed what it means that RMSE rewards the mean and MAE rewards the median. But what about MAPE, which is still one of the most popular error measures in practice? Which forecasts does it reward?

As discussed in an old post of mine, MAPE measures the error as a percentage of the actual value. If you sold 100 units and forecasted 50, the error is 50%. If you forecasted 150, it is also 50%. Sounds fair, but the underforecast can never be worse than 100% (forecasting zero), while the overforecast is not bounded at all: forecast 300 and you get 200%. So, MAPE punishes overforecasts more than underforecasts and pushes the forecast down.

To see this, I took the same example as before: weekly sales of a product, explained by two promotional campaigns via a linear regression. This time, I estimated it using MAPE. The main image in this post shows a histogram of the residuals (actuals minus forecast) with the mean (red), the median (blue) and zero (dashed line). Zero corresponds to the best forecast according to MAPE. It is to the left of both the mean and the median: 65% of actual sales lie above the fitted line. In other words, MAPE rewards forecasts that are systematically too low.

This is not specific to my example. MAPE rewards a forecast below the median, and the more skewed the data, the lower it goes: in additional simulations that I did, it was around the 16% quantile for typical skewed data. If you then use such a forecast for ordering, you will end up with stockouts.

And then there is intermittent demand. The image below shows 156 weeks of simulated demand, with no sales in 68% of them.

MAPE and intermittent demand
MAPE and intermittent demand

The mean (red line) is 2.1 units per week and the median is zero. MAPE cannot be calculated here at all: any forecast above zero gives an infinite error in weeks with no sales (you cannot divide by zero), and the forecast of zero gives 0/0.

A typical workaround is to drop the zeros. But then the best forecast according to MAPE becomes 4 units per week, almost twice the mean. This is because, after dropping the zeros, you answer a different question: “how much will we sell in a week when we sell something?” And even that is underestimated: the average non-zero demand here is 6.5. So, depending on how you treat the zeros, MAPE either breaks or rewards a forecast that is wrong for both questions.

Notice that MAPE does not reward the mean in either case. So, if your model produces mean forecasts (which is what most statistical models and ML methods do by default), MAPE will favour the wrong ones.

So, my recommendation is simple: avoid MAPE. Decide what your forecast aims for, and choose the error measure that rewards exactly that.

And what about sMAPE? Should I write a post about it as well?

Leave a comment