Course contentsShow
← Machine Learning and Deep Learning
Lesson 2400 of 3,53852. Time Series and ForecastingFree lesson

ARMA Models

Combining autoregressive and moving average components into unified ARMA(p,q) models for stationary series.

ARMA Models

What you'll learn: How to combine autoregressive (AR) and moving average (MA) components into a single unified ARMA(p,q) model for forecasting stationary time series.

The Core Idea

You've already learned AR models (which use past values) and MA models (which use past forecast errors). An ARMA model simply combines both approaches into one powerful framework. Think of it like having two lenses to view patterns in your data: one that sees direct relationships with past observations, and another that captures lingering effects from past surprises.

An ARMA(p,q) model has two parameters:

  • p: the number of autoregressive (AR) terms
  • q: the number of moving average (MA) terms

The ARMA Equation

The mathematical form looks like this:

X_t = c + φ₁X_{t-1} + φ₂X_{t-2} + ... + φₚX_{t-p}
        + ε_t + θ₁ε_{t-1} + θ₂ε_{t-2} + ... + θₑε_{t-q}

The first part (φ terms) is the AR component; the second part (θ terms) is the MA component.

Why ARMA Is Powerful

Many real-world stationary time series exhibit both types of dependencies. Sales data might depend on last week's sales (AR) while also being influenced by unexpected shocks like promotions that have lingering effects (MA). ARMA captures both simultaneously.

Choosing p and q

You use ACF and PACF plots to identify appropriate values. The ACF helps identify q (it cuts off after lag q for pure MA), while PACF helps identify p (it cuts off after lag p for pure AR). When both decay gradually, you likely need ARMA.

Key Takeaway: ARMA(p,q) models unify autoregressive and moving average components, letting you model stationary time series with both direct lag dependencies and error-based patterns in a single, flexible framework.