Skip to content

Mean Absolute Error (MAE)

  • Measures the average magnitude of prediction errors using absolute differences (ignores sign).
  • Commonly used in regression analysis to evaluate and compare model performance.
  • Less sensitive to large errors or outliers than mean squared error and applicable to varied data distributions.

Mean Absolute Error (MAE) is calculated by taking the average of the absolute differences between the predicted values and the actual values. Formally:

MAE=1ni=1nyiy^i\text{MAE} = \frac{1}{n}\sum_{i=1}^{n} |y_i - \hat{y}_i|

where y_i are the actual values and \hat{y}_i are the predicted values.

MAE quantifies prediction accuracy in regression by averaging the absolute deviations between predictions and true values. Because it uses absolute values, MAE reports the mean magnitude of errors without canceling positive and negative errors. Compared with other error measures such as mean squared error, MAE is described as not being affected by large errors or outliers and is relatively insensitive to the distribution shape of the data, allowing use with skewed or non-normal distributions. MAE is straightforward to interpret and understand, and it can be used to compare different regression models and highlight areas for improvement.

If a model predicts 3, 4, 5, and 6 for a set of actual values 2, 3, 4, and 5, the MAE is shown as:

MAE=(32+43+54+65)/4=1.5\text{MAE} = (|3-2| + |4-3| + |5-4| + |6-5|) / 4 = 1.5

This is reported as an average error of 1.5 for the model’s predictions.

For a stock price prediction model that predicts 100whentheactualpriceis100 when the actual price is 105, and predicts 90whentheactualpriceis90 when the actual price is 95, the errors are |100-105| = 5 and |90-95| = 5. The MAE is:

MAE=(5+5)/2=5\text{MAE} = (5 + 5) / 2 = 5

This indicates an average error of 5 dollars per prediction.

  • Regression analysis for evaluating model accuracy.
  • Comparing performance of different regression models and identifying areas for improvement.
  • Applying to regression problems with varied data distributions (including skewed or non-normal).
  • Unlike mean squared error, MAE is described as not being affected by large errors or outliers.
  • MAE is relatively insensitive to the distribution of the data and can be used with skewed or non-normal distributions.
  • Mean Squared Error (MSE)