Fiveable

๐Ÿ“‰Statistical Methods for Data Science Unit 13 Review

QR code for Statistical Methods for Data Science practice questions

13.1 Time Series Components and Stationarity

๐Ÿ“‰Statistical Methods for Data Science
Unit 13 Review

13.1 Time Series Components and Stationarity

Written by the Fiveable Content Team โ€ข Last updated September 2025
Written by the Fiveable Content Team โ€ข Last updated September 2025
๐Ÿ“‰Statistical Methods for Data Science
Unit & Topic Study Guides

Time series analysis breaks down data into key components: trend, seasonality, cyclical patterns, and noise. Understanding these elements helps us make sense of complex data and spot important patterns over time.

Stationarity is crucial for many time series models. It means the data's statistical properties stay constant over time. We use tools like autocorrelation and decomposition to check for stationarity and separate the different components of our data.

Time Series Components

Fundamental Concepts of Time Series

  • Time series data consists of observations collected sequentially over time at regular intervals (hourly, daily, monthly, yearly)
  • Trend component captures the long-term increase or decrease in the data over time
    • Can be linear, showing a constant rate of change
    • Can be non-linear, varying in direction or rate of change over time (quadratic, exponential)
  • Seasonality refers to patterns that repeat at fixed intervals, usually within a year (quarterly sales, monthly rainfall)
    • Seasonal patterns have a fixed period and consistent magnitude
  • Cyclical patterns occur when data exhibits rises and falls without a fixed period
    • Cycles have varying length and magnitude (business cycles, economic booms and recessions)

Noise and Irregularity in Time Series

  • Random noise, or irregular component, represents the residuals after accounting for trend, seasonality, and cyclical patterns
    • Captures unexpected fluctuations or outliers not explained by other components
    • Assumed to be random and not predictable
  • Time series can be modeled as a combination of trend, seasonal, cyclical, and irregular components
    • Additive model: $Y_t = T_t + S_t + C_t + I_t$, where components are added together
    • Multiplicative model: $Y_t = T_t \times S_t \times C_t \times I_t$, where components are multiplied

Stationarity and Autocorrelation

Stationarity in Time Series

  • Stationarity is a key assumption in many time series models and analyses
    • A stationary series has constant mean, variance, and autocorrelation over time
    • Non-stationary series exhibit trends, cycles, or changing variance that can lead to spurious results
  • Weak stationarity (covariance stationarity) requires constant mean and covariances that depend only on the lag between observations
  • Strict stationarity requires the joint probability distribution to be invariant over time
    • Difficult to verify in practice, so weak stationarity is often assumed

Autocorrelation and Partial Autocorrelation

  • Autocorrelation measures the linear relationship between a series and its lagged values
    • Autocorrelation function (ACF) plots the correlation coefficients for different lags
    • Helps identify the presence and strength of serial dependence in the data
  • Partial autocorrelation measures the correlation between a series and its lagged values, controlling for the effects of intervening lags
    • Partial autocorrelation function (PACF) plots the partial correlation coefficients for different lags
    • Useful for identifying the order of autoregressive terms in ARIMA models
  • Unit root tests, such as Dickey-Fuller or Phillips-Perron tests, assess the stationarity of a time series
    • Null hypothesis: the series has a unit root (is non-stationary)
    • Rejecting the null hypothesis suggests the series is stationary

Time Series Decomposition

Decomposing Time Series into Components

  • Decomposition separates a time series into its constituent components: trend, seasonality, and random noise
    • Helps understand the underlying patterns and structure of the data
    • Allows for more accurate modeling and forecasting by addressing each component separately
  • Trend component represents the long-term direction of the series
    • Can be estimated using moving averages, polynomial regression, or spline smoothing
  • Seasonality captures regular, periodic fluctuations within a fixed time frame
    • Can be estimated using seasonal indices or Fourier terms
    • Seasonal adjustment removes the seasonal component to focus on trend and irregular components

Decomposition Methods and Residuals

  • Additive decomposition assumes the components are added together: $Y_t = T_t + S_t + I_t$
    • Suitable when the magnitude of seasonal fluctuations does not vary with the level of the series
    • Example: monthly sales with consistent seasonal peaks and troughs
  • Multiplicative decomposition assumes the components are multiplied: $Y_t = T_t \times S_t \times I_t$
    • Appropriate when the magnitude of seasonal fluctuations varies with the level of the series
    • Example: quarterly GDP growth rates with increasing volatility over time
  • Random noise, or irregular component, represents the residuals after removing trend and seasonality
    • Should be stationary and uncorrelated for a well-specified decomposition
    • Can be modeled using ARMA or GARCH processes to capture any remaining patterns or volatility