Introduction

In previous articles, we introduced moving average processes MA(q), and autoregressive processes AR§ as two ways to model time series. Now, we will combine both methods and explore how ARMA(p,q) and ARIMA(p,d,q) models can help us to model and forecast more complex time series.

This article will cover the following topics:

  • ARMA models
  • ARIMA models
  • Ljung-Box test
  • Akaike information criterion (AIC)

By the end of this article, you should be comfortable with implementing ARMA and ARIMA models in Python and you will have a checklist of steps to take when modelling time series.

The notebook and dataset are here.

Let’s get started!

For hands-on video tutorials on machine learning, deep learning, and artificial intelligence, checkout my YouTube channel.

ARMA Model

Recall that an autoregressive process of order p is defined as:

Where:

  • p is the order
  • c is a constant
  • epsilon: noise

Recall also that a moving average process q is defined as:

Where:

  • q is the order
  • c is a constant
  • _epsilon _is noise

Then, an ARMA(p,q) is simply the combination of both models into a single equation:

Hence, this model can explain the relationship of a time series with both random noise (moving average part) and itself at a previous step (autoregressive part).

Let’s how an ARMA(p,q) process behaves with a few simulations.

#machine-learning #towards-data-science #data-science #artificial-intelligence #python

Advanced Time Series Analysis with ARMA and ARIMA
4.30 GEEK