What is an ARIMA model?

ARIMA is an acronym that stands for AutoRegressive Integrated Moving Average. The ARIMA model allows us to forecast a time series using the series’ past values.

A time series is a collection of data points collected at constant time intervals. Time series are used to forecast future values based on previous values.

Stationary Time series: A stationary time series is one whose statistical properties (mean, variance, autocorrelation, etc). are all constant over time. A non-stationary series is one whose statistical properties change over time.

An ARIMA model is characterized by 3 terms: p,d,qp, d, q

  • pp is the order of the AR (auto-regressive) part of the model term.

  • qq is the order of the MA (moving average) term.

  • dd is the number of differencing (i.e., the number of past time points to subtract from the current value) required to make the time series stationary.

The values for pp and qq can be determined using two plots:

  • Autocorrelation function (ACF): A measure of the correlation between the time series and a lagged version of the time series. We can use ACF to determine the optimal number of MA (qq) terms.

  • Partial autocorrelation function (PACF): This measures the correlation between the time series and a lagged version of the time series after eliminating the variations already explained by the intervening comparisons. We can use PACF to determine the optimal number of terms (qq) to use in the AR model.

An example of a time series prediction plotted with the actual output. Image credits: Selva Prabhakaran (Machine Learning Plus)
An example of a time series prediction plotted with the actual output. Image credits: Selva Prabhakaran (Machine Learning Plus)

Non-stationary time series

For a non-stationary time series, the series has to be first transformed into a stationary series. The ARIMA model generally fits the non-stationary time series, based on the ARIMA model, with a differencing process that effectively transforms the non-stationary data into a stationary one. SARIMA models, which combine seasonal differencing with an ARIMA model, are used for time-series data modeling with periodic characteristics.

Copyright ©2024 Educative, Inc. All rights reserved