ARIMA

Also known as: Autoregressive integrated moving average

On this page 7

ARIMA, short for autoregressive integrated moving average, is a linear statistical model that forecasts a time series from a weighted combination of its own past values and past forecast errors, after the series has been differenced enough times to become stationary. Within time series forecasting and the broader field of artificial intelligence, ARIMA is the classical baseline against which machine learning and deep-learning forecasters are routinely judged.

The model is written as ARIMA(p, d, q), where the three integers set the autoregressive order, the degree of differencing and the moving average order. Its strengths are interpretability, small data requirements and well-calibrated prediction intervals for short horizons; its main weakness is that it captures only linear dependence in a single series.

How the three ARIMA components work

ARIMA combines three mechanisms. The autoregressive part regresses the current value on its p previous values, the integrated part replaces the raw series with differences between consecutive observations d times, and the moving average part models the current value as a function of the q most recent random shocks.

The table below summarizes what each parameter controls and the values seen in practice.

ParameterMeaningTypical valuesDiagnostic clue
p (AR order)Number of lagged values used0 to 3PACF cuts off after lag p
d (differencing)Times the series is differenced0, 1 or 2Unit root test or slowly decaying ACF
q (MA order)Number of lagged errors used0 to 3ACF cuts off after lag q
ARIMA parameters and their roles

Fitting is usually performed by maximum likelihood estimation under the assumption of Gaussian white-noise errors. The fitted model then produces point forecasts recursively, feeding each prediction back as an input for the next step, and the forecast variance grows with the horizon because errors accumulate.

Stationarity and the role of differencing

ARIMA assumes that, after differencing, the series has a constant mean, constant variance and stable autocorrelation. A series with a trend violates this assumption, and first differencing usually removes a linear trend, while second differencing removes a quadratic one. Over-differencing is a real risk: it introduces artificial negative autocorrelation and inflates forecast variance.

Practitioners confirm the degree of differencing with formal tests. The augmented Dickey-Fuller test takes non-stationarity as its null hypothesis, whereas the KPSS test takes stationarity as its null, so using both reduces the chance of a wrong conclusion. A changing variance is handled separately, typically with a logarithmic or Box-Cox transformation applied before differencing.

ARIMA variants and extensions

The basic model has several extensions that address its most common limitations. The choice depends on whether the series is seasonal, whether external drivers are available and whether several series must be modeled jointly.

VariantWhat it addsTypical use
SARIMASeasonal orders (P, D, Q) at period mMonthly sales with yearly cycles
ARIMAXExogenous covariates as regressorsDemand driven by price or promotions
Regression with ARIMA errorsLinear model with autocorrelated residualsElectricity load explained by temperature
VARIMAJoint dynamics of several seriesInteracting macroeconomic indicators
ARFIMAFractional differencing for long memoryHydrology and network traffic
Auto ARIMAAutomated order search by information criteriaForecasting thousands of series at scale
Common members of the ARIMA family

Seasonal ARIMA is written as ARIMA(p, d, q)(P, D, Q)m. Long or multiple seasonal periods, such as hourly data with daily and weekly cycles, are poorly served by SARIMA; adding Fourier terms as exogenous regressors is a standard workaround.

How ARIMA compares with other forecasters

ARIMA occupies the space between very simple baselines and data-hungry learned models. Its closest relative is exponential smoothing: many ETS models have exact ARIMA equivalents, but ETS describes level, trend and seasonality explicitly, whereas ARIMA describes autocorrelation.

MethodStrengthWeakness relative to ARIMA
Naive forecastZero fitting, robust benchmarkIgnores autocorrelation structure
ETS modelIntuitive components, fast fittingLess flexible for complex autocorrelation
ProphetEasy holidays and changepointsWeaker on short-term dynamics
Gradient boosting with lagsNonlinear effects, many covariatesNeeds feature engineering and more data
DeepAR or N-BEATSLearns across many related seriesRequires large datasets and tuning
Time series foundation modelZero-shot forecasts without fittingLess transparent, uneven on niche data
ARIMA relative to neighboring methods

Results from the M competitions show that simple statistical models remain hard to beat on many short, noisy series, while global learned models gain an advantage when thousands of related series share patterns. A sound workflow therefore fits ARIMA or ETS as a benchmark before adopting a more complex model.

Building and validating an ARIMA model

The classical Box-Jenkins methodology structures model building into identification, estimation and diagnostic checking. Modern libraries automate much of it, but the steps remain the same.

  1. Plot the series, stabilize variance with a transformation if needed.
  2. Choose d with unit root tests and choose candidate p and q from ACF and PACF plots.
  3. Fit candidates and compare them with AIC or AICc, never across different d values.
  4. Check that residuals resemble white noise with the Ljung-Box test.
  5. Evaluate with rolling-origin cross-validation using MASE or sMAPE rather than one split.

The most common mistakes are comparing information criteria across differencing orders, which is invalid because the likelihoods refer to different data, and trusting long-horizon forecasts. ARIMA forecasts converge toward the mean or a fixed trend, so beyond a few seasonal cycles the prediction intervals become very wide and the point forecast carries little information.

A non-technical view

ARIMA predicts tomorrow from yesterday. It asks two questions. How did recent values behave? How wrong were the last few guesses? It then combines the answers into a new forecast.

Before it starts, it removes steady growth by looking at changes instead of totals. Think of tracking daily weight changes rather than total weight. The key takeaway: ARIMA is a careful pattern follower. It works well for the near future and loses accuracy further ahead.

A concrete example

A regional water utility forecasts daily water demand 14 days ahead to plan pumping schedules. Its analyst takes four years of daily data, applies a log transformation to stabilize variance and finds that one regular difference and one weekly seasonal difference make the series stationary. ACF and PACF plots suggest a SARIMA(1,1,1)(0,1,1)7 model, and daily maximum temperature is added as an exogenous regressor.

Rolling-origin evaluation over the final year gives a MASE of about 0.7, clearly better than the seasonal naive benchmark, and the 80 percent prediction intervals contain the actual demand close to 80 percent of the time. The utility uses the upper interval bound to schedule reservoir filling, which reduces emergency pumping during heat waves while keeping energy costs predictable.