Time Series Basics
Data indexed by time. Understanding the patterns hidden in sequences of observations — from stock prices to climate records to network traffic.
What is a Time Series?
A sequence of observations indexed by time. Unlike cross-sectional data, each observation is correlated with its neighbors — yesterday's value tells us something about today's.
Trend
The long-run direction of the series. Is it rising, falling, or flat? GDP trends upward. Sea levels trend upward. Landline subscriptions trend downward.
Seasonality
Periodic, predictable fluctuations tied to the calendar or natural cycles. Regular intervals, known length.
Cycles & Noise
Two more pieces of the puzzle:
- Cyclicality — longer, irregular waves (business cycles, 3–10 years); not tied to the calendar
- Noise — random, unpredictable variation; what remains after trend + season + cycle are removed
Additive Model
When seasonal swings stay roughly constant in size regardless of the trend level, we add the components:
Multiplicative Model
When seasonal swings grow in proportion to the trend (common in economic data), multiply the components. Log-transforming converts multiplicative to additive.
Stationarity
Most models require the series to be stationary — statistical properties that don't change over time:
- Constant mean
- Constant variance
- Autocovariance depends only on lag, not time
Differencing
A series with trend is not stationary. Differencing removes the trend by computing changes between consecutive observations:
ACF — Autocorrelation
The Autocorrelation Function measures how similar the series is to a lagged copy of itself. ρ(k) = correlation at lag k.
PACF — Partial ACF
Measures the direct correlation at lag k, controlling for shorter lags. Together with ACF, it identifies the right ARIMA model order:
- AR(p): ACF decays, PACF cuts off after lag p
- MA(q): ACF cuts off after lag q, PACF decays
- ARMA: both decay gradually
What you learned
Time series data has structure: trend, seasonality, cycles, and noise. Stationarity is the key property for modeling. ACF and PACF are your diagnostic compass for identifying the right model.