Time Series Analysis Cheat Sheet

ARIMA modeling, stationarity testing, ACF/PACF interpretation, decomposition, and forecasting methodologies for time-dependent data.

Last Updated: May 1, 2025

Stationarity

ItemDescription
Stationary ProcessConstant mean, constant variance, covariance depends only on lag (not time)
Why It MattersNon-stationary data produces spurious regressions and misleading forecasts
ADF Test (Augmented Dickey-Fuller)H0: Unit root exists (non-stationary); reject = stationary
KPSS TestH0: Stationary — complementary to ADF; use both for confirmation
Differencing: y'_t = y_t - y_(t-1)Remove trend by first difference; seasonality by seasonal difference
TransformationsLog: stabilize variance; Box-Cox: generalized variance stabilization

ACF & PACF

ItemDescription
ACF (Autocorrelation Function)Correlation of series with its own lagged values at different lags
PACF (Partial Autocorrelation)Correlation at lag k after removing effects of intermediate lags
ACF for AR(p)Gradual decay (tails off)
PACF for AR(p)Sharp cutoff after lag p — identifies AR order
ACF for MA(q)Sharp cutoff after lag q — identifies MA order
PACF for MA(q)Gradual decay (tails off)
White NoiseACF ~ 0 at all non-zero lags — no patterns, nothing to model

ARIMA Models

ItemDescription
AR(p): y_t = c + phi1*y_(t-1) + ... + phip*y_(t-p) + epsilon_tAutoregressive — current value depends on p past values
MA(q): y_t = mu + epsilon_t + theta1*e_(t-1) + ... + thetaq*e_(t-q)Moving Average — depends on past forecast errors, not past values
ARIMA(p,d,q)d = differencing order; AR + differencing + MA = powerful combo
SARIMA: ARIMA + seasonal components (P,D,Q,m)Handles repeating patterns: daily, weekly, quarterly cycles
auto_arima (Python)Automatically selects best p,d,q — good starting point
Box-Jenkins MethodologyIdentify model form → estimate parameters → check residuals → forecast

Decomposition & Forecasting

ItemDescription
Additive: y_t = Trend + Seasonal + ResidualFor constant seasonal amplitude
Multiplicative: y_t = Trend * Seasonal * ResidualFor seasonality that grows with trend
Seasonal DecompositionSTL (Seasonal-Trend decomposition using LOESS) — modern, robust method
Forecast Evaluation: MAE, RMSE, MAPEHold-out validation: train on past, test on future
Training/Test Split for Time SeriesALWAYS time-ordered — never random shuffle for time series
Pro Tip: Stationarity is the foundation — almost all time series models assume constant mean and variance over time. Always check and transform non-stationary data (differencing, log) first.