ARIMA & SARIMA: Classic Statistical Models for Time Series

· Source: Machine Learning on Medium · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Data Science & Analytics · Depth: Intermediate, long

Summary

ARIMA and SARIMA are classic statistical models for single-variable time series forecasting. ARIMA(p, d, q) integrates AutoRegressive (AR), Integrated (I) for differencing, and Moving Average (MA) components, where "p", "d", and "q" define their orders. The model requires data stationarity, often achieved by differencing, confirmed via the ADF test. Parameters "p" and "q" are typically determined by analyzing Autocorrelation Function (ACF) and Partial Autocorrelation Function (PACF) plots. SARIMA(p, d, q)(P, D, Q)s extends ARIMA by incorporating seasonal components (P, D, Q) at a specified seasonal period "s", enabling it to capture recurring patterns. A case study on 72 months of retail sales data demonstrated ARIMA(2,1,2) achieved a 6.69% MAPE and 0.71 seasonal MASE. SARIMA(1,1,0)(1,1,0)₁₂ significantly improved accuracy, yielding a 2.01% MAPE and 0.22 seasonal MASE, making it the champion model for seasonal data. Both models provide uncertainty intervals and require residual diagnostics.

Key takeaway

For Data Scientists or Machine Learning Engineers building time series forecasts, if your data exhibits clear seasonality, you should prioritize SARIMA over basic ARIMA. SARIMA's ability to explicitly model seasonal patterns, as demonstrated by reducing MAPE from 6.69% to 2.01% in retail sales, will significantly improve your forecast accuracy. Always validate your model by checking residual diagnostics to ensure all patterns are captured.

Key insights

ARIMA and SARIMA models effectively forecast time series by combining autoregressive, integrated, and moving average components, with SARIMA adding seasonal capability.

Principles

Method

Determine "d" via ADF test for stationarity. Analyze ACF/PACF plots for "p" (PACF cut-off) and "q" (ACF cut-off). Compare candidate models using AIC/BIC. Validate with residual diagnostics.

In practice

Topics

Best for: Machine Learning Engineer, Data Scientist, AI Student

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Machine Learning on Medium.