SARIMA (Seasonal ARIMA) › Visualizing SARIMA

Michael BrenndoerferAugust 11, 20254 min read
Machine Learning from ScratchAll chapters
Part 13 of 15Time Series Forecasting
Chapter 80SARIMA (Seasonal ARIMA) › Visualizing SARIMA
Reading section 4 of 9 · Visualizing SARIMA · 4 minSection 4 of 9 · 4 min

Section 4 of 9 · 4 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Let's create a visualization that demonstrates the main components and behavior of a SARIMA model. We'll generate a synthetic time series with both trend and seasonal components, then show how SARIMA decomposes and models this data.

VisualizationsOut [3]
CollapseExpand
Monthly time series from 2010 to 2020 with a rising trend and repeating annual oscillations.
Original monthly series containing the upward trend, annual seasonal cycle, and random variation used in the additive decomposition.
Trend line increasing smoothly from roughly 105 to 195 over the decomposition period.
Extracted trend component showing the long-term increase in the time series after seasonal and residual variation are removed.
VisualizationsOut [4]
CollapseExpand
Repeating seasonal line oscillating between approximately minus 20 and plus 20 each year.
Extracted seasonal component showing the repeating 12-month cycle centered around zero.
Residual time series fluctuating irregularly around zero between approximately minus 10 and plus 10.
Residual component showing the irregular variation left after subtracting the estimated trend and seasonal components.

This visualization shows how SARIMA decomposes a time series into its fundamental components. The original series exhibits both a clear upward trend and regular seasonal fluctuations. The decomposition reveals the underlying trend component that captures the long-term growth pattern, the seasonal component that shows the repeating annual cycle, and the residual component that contains the random noise and any patterns not captured by trend and seasonality.

VisualizationsOut [5]
CollapseExpand
ACF stem plot from lag 0 to 40 with a confidence band and slowly decaying, repeating positive correlations including a seasonal rise near lag 12.
Autocorrelation function through lag 40 with 95% confidence limits. The repeating peaks, including elevated correlation around seasonal lag 12, reveal the series' annual dependence structure.
PACF stem plot from lag 0 to 40 with a confidence band, prominent early-lag spikes, and smaller conditional correlations at later lags.
Partial autocorrelation function through lag 40 with 95% confidence limits. The isolated conditional correlations help identify plausible autoregressive orders after controlling for shorter lags.

The ACF and PACF plots reveal the autocorrelation structure used to determine appropriate SARIMA model parameters. The ACF shows significant correlations at lags 12 and 24, indicating strong seasonal patterns with a 12-month cycle. The PACF helps identify the order of autoregressive terms by showing the partial correlations after removing the effects of intermediate lags.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy