ARIMA Models: How Nonstationary Models Are Built from Stationary Ones#
Stage 6 · 🏗️ Building & Forecasting Models · Lesson 15 of 18 · advanced
◀ Previous · Order Selection for Time Series Models · Next · SARIMA Models: Seasonal ARIMA ▶ · ↑ Section
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
The core idea#
ARMA needs a stationary series, but real data trends and drifts. ARIMA bridges the gap with one move: difference the series until it is stationary, fit an ordinary ARMA to the differenced version, and the model inherits ARMA’s whole toolkit. The “I” stands for Integrated — the series must be un-differenced (integrated) to recover the original.
The model#
An ARIMA(p, d, q) applies the \(d\)-th difference \((1-B)^d\) before the ARMA machinery:
Here \((1-B)^d\) is the differencing operator, \(\phi(B)\) the AR polynomial and \(\theta(B)\) the MA polynomial. A series needing \(d\) differences to become stationary is called integrated of order \(d\), or \(I(d)\).
Choosing d#
One difference (\(d = 1\)) removes a linear trend; two (\(d = 2\)) removes a quadratic one; seasonal patterns need a seasonal difference (next lesson). Pick the smallest \(d\) that makes the ADF / KPSS tests read stationary — over-differencing inflates the variance and injects artificial correlation, so more is not better.
Forecasting back#
Fitting happens on the differenced scale, but forecasts are wanted on the original one. The
model “integrates” — cumulatively sums — its differenced-scale predictions back up to the level
of the raw series, carrying the forecast uncertainty with it. In statsmodels this is all
handled by ARIMA(y, order=(p, d, q)).
Hint
Related lessons: A Gentle Introduction to Stationarity · Understanding ARMA Processes · SARIMA Models: Seasonal ARIMA · Order Selection for Time Series Models
See also
Source article Adapted (context, re-expressed) in our own words from: https://insightful-data-lab.com/2026/01/17/arima-models-how-nonstationary-models-are-built-from-stationary-ones/ (insightful-data-lab.com).