The Mean Absolute Percentage Error (MAPE) is a statistical measure used to assess the accuracy of a forecasting method. It expresses the prediction error as a percentage of the actual values, allowing users to gauge how far off the predictions are from the true outcomes. Since MAPE is a relative measure, it is particularly useful for comparing forecast performance across different datasets or time periods, making it a favorite among developers in fields such as supply chain management, finance, and any predictive modeling tasks.
To calculate MAPE, you first determine the absolute error for each forecasted value. This is done by subtracting the forecasted value (F) from the actual value (A) to get the absolute error (|A - F|). You then divide this absolute error by the actual value (A) to get the percentage error for that particular prediction: |A - F| / A. After computing the percentage errors for all observations, the mean of these values is calculated. The formula can be summarized as follows:
[ \text{MAPE} = \frac{1}{n} \sum_{i=1}^{n} \left( \frac{|A_i - F_i|}{A_i} \right) \times 100 ]
where (n) is the number of observations.
For example, suppose you have three actual sales values of 100, 150, and 200, and corresponding forecasted values of 110, 140, and 190. The absolute percentage errors for these values would be 10%, 6.67%, and 5%, respectively. The MAPE would be the average of these errors, resulting in a MAPE of about 7.22%. This value indicates how closely the forecasted figures align with the actual data, with a lower MAPE suggesting greater accuracy in predictions.