Stationarity
| Item | Description |
Stationary Process | Constant mean, constant variance, covariance depends only on lag (not time) |
Why It Matters | Non-stationary data produces spurious regressions and misleading forecasts |
ADF Test (Augmented Dickey-Fuller) | H0: Unit root exists (non-stationary); reject = stationary |
KPSS Test | H0: 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 |
Transformations | Log: stabilize variance; Box-Cox: generalized variance stabilization |
ACF & PACF
| Item | Description |
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 Noise | ACF ~ 0 at all non-zero lags — no patterns, nothing to model |
ARIMA Models
| Item | Description |
AR(p): y_t = c + phi1*y_(t-1) + ... + phip*y_(t-p) + epsilon_t | Autoregressive — 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 Methodology | Identify model form → estimate parameters → check residuals → forecast |
Decomposition & Forecasting
| Item | Description |
Additive: y_t = Trend + Seasonal + Residual | For constant seasonal amplitude |
Multiplicative: y_t = Trend * Seasonal * Residual | For seasonality that grows with trend |
Seasonal Decomposition | STL (Seasonal-Trend decomposition using LOESS) — modern, robust method |
Forecast Evaluation: MAE, RMSE, MAPE | Hold-out validation: train on past, test on future |
Training/Test Split for Time Series | ALWAYS 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.