What is MAPE? (Mean Absolute Percentage Error)
MAPE is a commonly used accuracy measure in time series forecasting. It expresses forecast error as a percentage, which makes it easy to interpret and compare across different scales and datasets.
Formula
[
\text{MAPE} = \frac{1}{n} \sum_{t=1}^{n} \left| \frac{A_t - F_t}{A_t} \right| \times 100
]
Where:
- ( A_t ) = actual value at time ( t )
- ( F_t ) = forecasted value at time ( t )
- ( n ) = number of observations
Interpretation
MAPE tells you, on average, what percent of the actual values your forecasts are off by. For example:
- MAPE = 5% → On average, your forecasts are 5% off from actual values.
- MAPE = 25% → Your model is 25% off, on average – less accurate.
Advantages
- Intuitive and easy to interpret – expressed as a percentage.
- Scale-independent – useful when comparing models across different datasets.
Limitations
- Division by zero issues: If any actual value ( A_t = 0 ), MAPE becomes undefined or explodes.
- Biased toward under-forecasts: Over-forecasts are penalized less than under-forecasts of the same absolute size.
- Not symmetric: The error percentage can be different for the same magnitude of over- and under-forecasting.
Alternatives
If MAPE’s limitations cause problems, you can consider:
- MAE (Mean Absolute Error) – doesn't suffer from division by zero.
- RMSE (Root Mean Square Error) – penalizes larger errors more.
- sMAPE (Symmetric MAPE) – modifies MAPE to address asymmetry.
- MASE (Mean Absolute Scaled Error) – useful for comparing across series.
Example
| Time | Actual ( A_t ) | Forecast ( F_t ) | Absolute % Error |
|---|
| 1 | 100 | 90 | ( \frac{10}{100} = 10% ) |
| 2 | 200 | 210 | ( \frac{10}{200} = 5% ) |
| 3 | 300 | 270 | ( \frac{30}{300} = 10% ) |
[
\text{MAPE} = \frac{10% + 5% + 10%}{3} = 8.33%
]
In Summary
- MAPE = Mean of the absolute forecast error percentage.
- Great for interpretable insights into forecast accuracy.
- Be cautious with zero or near-zero actuals and use alternatives when needed.
Let me know if you want comparisons or code examples (e.g., Python with pandas/sklearn)!