timeseries merge

📚 timeseries merge.pdf

Brief overview

This document introduces the fundamental concepts of time series analysis, covering its definition, diverse applications, and core components such as trend and seasonality. It provides a foundational understanding for analyzing sequential data across various disciplines.

Key points

  • Overview of time series data types and their fundamental components.
  • Explanation of transformations and classical decomposition models.
  • Understanding of operators, stationarity, and relevant statistical tests.
  • Introduction to stochastic models including AR, MA, ARMA, ARIMA, and SARIMA.

1. Introduction to time series analysis

1.1 Definition and examples of time series

  • A time series is a sequence of measurements or counts taken at successive time points.
  • These observations are collected sequentially over time.
  • Time series analysis is crucial in statistics and applied across many fields.

📝 Example: Daily stock market indices, monthly rainfall, annual crop yields, and yearly infant mortality rates are all examples of time series data 1.

1.2 Types of time series data

  • Time series data can originate from various domains, each with distinct characteristics.
  • These types help in understanding the nature of the data and choosing appropriate analysis methods.

1.2.1 Economic and financial time series

  • These relate to economic activity and financial markets.
  • Examples include stock prices, export totals, company profits, and income levels recorded over time.

1.2.2 Physical time series

  • Common in the physical sciences, especially meteorology and geophysics.
  • Examples are daily rainfall, hourly air temperatures, and continuous measurements of environmental factors.

1.2.3 Marketing time series

  • Used in commerce to analyze sales performance and related metrics.
  • This can include weekly or monthly sales figures, advertising costs, and revenue receipts 2.

1.2.4 Demographic time series

  • Focuses on population changes and vital statistics.
  • Examples include annual population totals for a country or monthly birth rates.

1.2.5 Process control data

  • Used in manufacturing to monitor and maintain process quality.
  • Measurements are plotted against time to detect deviations from target values, allowing for corrective actions.

1.2.6 Binary processes

  • Observations can only take one of two values, typically 0 or 1.
  • Predicting when the process might switch values is a common challenge 3.

1.2.7 Point processes

  • Involve a series of events occurring randomly over time, not necessarily at equally spaced intervals.
  • Analysis focuses on the number of events in a period or the time between events.

🔑 Important: Point process analysis methods differ significantly from standard time series analysis 4.

1.3 Terminology: Continuous vs. Discrete time series

  • A continuous time series has observations made continuously over time, like heart rate monitoring.
  • A discrete time series has observations taken at specific, usually equally spaced, times.
  • This course focuses on discrete time series, which are most common in practice.

1.3.1 Discrete time series origins

  • Discrete series can arise by sampling continuous data at regular intervals.
  • They can also emerge from accumulating values over equal time intervals, like monthly exports.

🔑 Important: Unlike random samples, successive observations in a time series are usually dependent and must be analyzed in their temporal order 5.

1.4 Stochastic nature of time series

  • If future values can be predicted exactly from past values, the series is deterministic.
  • Most time series are stochastic, meaning the future is only partly determined by the past.
  • Predictions for stochastic series involve probability distributions conditioned on past observations.

1.5 Basic descriptive techniques and components

  • Standard summary statistics (mean, standard deviation) can be misleading in time series with systematic components like trend or seasonality.
  • Time series are typically decomposed into several components to understand their variation.

1.5.1 Trend

  • The trend represents the long-term change in the average level of a time series.
  • It can be linear or non-linear, indicating a sustained increase or decrease in the data over time.

📝 Example: Long-term population growth or a decline in agricultural production illustrate trend 6.

1.5.2 Seasonal effect

  • This refers to wave-like fluctuations with a fixed period of less than a year, occurring at known frequencies.
  • Examples include monthly sales variations or average monthly temperatures.

📝 Example: Sales of umbrellas are typically higher in rainy seasons, and tourist arrivals often peak during specific months.

1.5.3 Cyclic effect

  • These are oscillations that do not have a fixed period but are predictable to some extent, often longer than seasonal patterns.
  • Economic data, for instance, may show business cycles lasting several years.

1.5.4 Irregular fluctuations

  • These are unforeseen and random variations that remain after systematic components are removed 7.
  • They can be caused by unpredictable events like floods, strikes, or wars.

1.6 Time plot analysis

  • Plotting observations against time, a time plot, is the first step in descriptive analysis.
  • It helps visualize trend, seasonality, outliers, and sudden changes in the series.
  • Outliers, which are extreme or inconsistent observations, need careful treatment, sometimes using robust methods.

📝 Example: A time plot might reveal that wine sales are seasonal and show a downward trend.

📝 Example: Monthly temperature plots can show regular seasonal patterns and potential outliers.

📝 Example: Airline passenger numbers might show an upward trend and increasing seasonal effects 12.

1.7 Objectives of time series analysis

  • The main goals of analyzing a time series include description, explanation, prediction, and control.
ObjectiveDescription
DescriptionPlotting data and obtaining descriptive measures to understand main properties and identify components like trend and seasonality 9.
ExplanationUsing variation in one series to explain variation in another, leading to a deeper understanding of the generating mechanism 10.
PredictionForecasting future values of the series, crucial for sales, economic, and industrial applications.
ControlAnalyzing series to improve control over physical or economic systems, such as maintaining manufacturing process quality 11.

1.8 Seasonality types

  • Additive seasonality occurs when the seasonal effect's magnitude is constant and does not change with the series level.
  • Multiplicative seasonality occurs when the seasonal effect's size is directly proportional to the series level, increasing with it.

🔑 Important: Additive seasonality implies a constant seasonal swing, while multiplicative seasonality implies a swing that grows with the trend 13.

1.9 Stationary time series (Intuitive understanding)

  • A stationary time series has no systematic changes in mean or variance, and strictly periodic variations are removed.
  • In essence, the statistical properties of one section of the data are similar to those of any other section.
  • Many real-world time series are non-stationary, requiring transformations to apply stationary time series theory.

🔑 Important: Stationarity means the time series behaves consistently over time, without persistent trends or changing variability 14.

2. Transformations and classical models

2.1 Transformations for time series stabilization

Transformations can adjust time series data for better modeling. They help stabilize variance, make seasonal effects additive, or achieve a normal distribution.

  • Stabilize variance: If variance increases with the mean, transforming the data can help. A logarithmic transformation is useful if the standard deviation is proportional to the mean. Transformations do not fix variance that changes without a trend; a different model is needed then.
  • Make seasonal effect additive: When seasonal effects grow with the mean (multiplicative seasonality), a transformation can make them constant (additive seasonality). Logarithmic transformations achieve this.
  • Make data normally distributed: Many models assume normal data distribution, which is not always the case in practice.

The Box Cox transformation is a general class that includes logarithmic and square-root transformations. However, one transformation might not achieve all goals simultaneously.

Forecasts made on transformed data must be back-transformed for interpretation 15.

2.2 Time series operators and classical models

Specific operators are used in time series analysis beyond basic arithmetic. These include the moving average, difference, and lag operators.

Classical time series models are basic methods. They are less common now due to advanced models, but they are useful when data is limited.

These models require data with trend/seasonal components and a reasonable number of observations 16.

Classical models fall into two main categories: additive and multiplicative.

🔑 Important: Classical models are best for smaller datasets with clear trend and seasonality.

2.2.1 Moving average operator

The moving average operator smooths a time series. It is defined as a weighted sum of past and future observations.

  • Formula: yt=∑r=−qqarxt+ry_t = \sum_{r=-q}^{q} a_r x_{t+r}, where ∑r=−qqar=1\sum_{r=-q}^{q} a_r = 1. The {ar}\{a_r\} are weights.
  • Symmetric moving average: Often, s=qs = q, meaning weights are equal: ar=1/(2q+1)a_r = 1/(2q+1) for r=−q,…,+qr = -q, \dots, +q. The smoothed value is yt=1m∑r=−qqxt+ry_t = \frac{1}{m} \sum_{r=-q}^{q} x_{t+r}, where m=2q+1m = 2q+1.

The length of the moving window should match the number of seasons per year (e.g., 4 for quarterly, 12 for monthly). A centered moving average is used for an even number of seasons.

Moving averages help remove seasonality.

Example calculations for moving averages:

The table shows how to calculate moving averages for a 3-season series. A similar process applies to quarterly data, including centered moving averages 18 19.

2.3 Additive and multiplicative decomposition models

Decomposition models break a time series into components: trend (TtT_t), seasonal (StS_t), and irregular (ItI_t). The observed series is YtY_t.

2.3.1 Additive model

In an additive model, components sum up: Yt=Tt+St+ItY_t = T_t + S_t + I_t. This model is suitable for additive seasonality.

Additive Model Fitting Procedure:

  1. Calculate moving averages (MA) or centered moving averages (CMA).
  2. Subtract MA/CMA from the original series to get the de-trended series.
  3. Compute seasonal indices by averaging de-trended data for each season.
  4. Adjust seasonal indices so they sum to 0 if needed.
  5. De-seasonalize the data by subtracting adjusted seasonal indices from the original series.
  6. Fit a regression line to the de-seasonalized data to find the trend line 22.

The trend line is estimated using Y=β0+β1t+ϵY = \beta_0 + \beta_1 t + \epsilon. For example, the fitted model might be Y=27.6439+0.5815tY = 27.6439 + 0.5815t.

The fitted value is Yt=Tt+StY_t = T_t + S_t 24.

📝 Example: To forecast the first two quarters of 1971, representative time indices are 21 and 22. Calculate trend values (T21T_{21}, T22T_{22}) and add the adjusted seasonal effects to get forecasts 25.

2.3.2 Multiplicative model

In a multiplicative model, components multiply: Yt=Tt×St×ItY_t = T_t \times S_t \times I_t. This is suitable for multiplicative seasonality.

Multiplicative Model Fitting Procedure:

  1. Calculate moving averages (MA) or centered moving averages (CMA).
  2. Divide the original series by MA/CMA to get the de-trended series.
  3. Calculate seasonal indices by averaging de-trended data for each season.
  4. Adjust seasonal indices so they sum to the number of seasons if needed.
  5. De-seasonalize the data by dividing the original series by adjusted seasonal indices.
  6. Fit a regression line to the de-seasonalized data to find the trend line 26.

The trend line is estimated using a regression model. For example, Y=3175.56+30.76tY = 3175.56 + 30.76t.

The fitted value is Yt=Tt×StY_t = T_t \times S_t. The irregular component is found by dividing the original series by the fitted value (Yt/YtY_t / Y_t) 28.

📝 Example: To forecast the first two quarters of 1989, use time indices 17 and 18. Calculate trend values (T17T_{17}, T18T_{18}) and multiply by the adjusted seasonal effects to forecast 29.

🔑 Important: Choose between additive and multiplicative models based on whether seasonality is constant or grows with the series level. If unsure, fit both and check residuals 17.

3. Operators and stationarity tests

3.1 Difference and lag operators

  • Difference operator (∇): Applies to a time series YtY_t to remove trends. The first difference is ∇Yt=Yt−Yt−1\nabla Y_t = Y_t - Y_{t-1}.

  • Higher-order differencing, ∇dYt\nabla^d Y_t, can be applied if the first difference is still non-stationary 30.

  • Seasonal differencing, ∇sYt=Yt−Yt−s\nabla_s Y_t = Y_t - Y_{t-s}, removes seasonal patterns. Here, ss is the number of seasons 31.

  • A combination of first and seasonal differencing may be needed 33.

  • Lag operator (L): Also known as the backward shift operator. It shifts observations back in time: LYt=Yt−1L Y_t = Y_{t-1}.

  • In general, LkYt=Yt−kL^k Y_t = Y_{t-k} for any positive integer kk.

Operators transform time series data for analysis.

3.2 Stochastic processes and stationarity

  • A stochastic process is a collection of random variables ordered in time, representing phenomena with random elements 35.
  • An observed time series (yty_t) is one realization from an infinite set of possible realizations (the ensemble).

3.2.1 Key process characteristics

  • Mean function (μt\mu_t): The expected value of the process at time tt, E(Yt)E(Y_t). It may or may not vary over time.
  • Variance function (σt2\sigma_t^2): The variance of the process at time tt, V(Yt)V(Y_t). It may or may not vary over time.
  • Autocovariance (γ(τ)\gamma(\tau)): The covariance between YtY_t and Yt+τY_{t+\tau}, measuring linear dependence at a lag τ\tau 36.
  • Autocorrelation (ρ(τ)\rho(\tau)): The standardized autocovariance, measuring the strength of linear dependence at lag τ\tau. ∣ρ(τ)∣≤1|\rho(\tau)| \le 1 37.

High ∣ρ(τ)∣|\rho(\tau)| means strong linear dependence; low means weak.

3.3 Types of stationarity

  • A time series is generally stationary if its mean, variance, and seasonal patterns are stable over time.

3.3.1 Strict stationarity

  • A process is strictly stationary if the joint distribution of (Y1,...,Yn)(Y_1,..., Y_n) is identical to (Y1+τ,...,Yn+τ)(Y_{1+\tau},..., Y_{n+\tau}) for any tt and τ\tau 38.
  • This implies that the mean, variance, and autocovariance function are constant and depend only on the lag.

3.3.2 Weak stationarity

  • A process is weakly stationary (or second-order stationary) if its mean is constant over time and its autocovariance function depends only on the lag τ\tau.
  • Weak stationarity is a less restrictive condition than strict stationarity and is often sufficient in practice 39.

3.4 Stationary vs. non-stationary series

  • Purely random or white noise process: Normally distributed with zero mean, constant variance, and is serially uncorrelated (autocovariance is zero for τ≠0\tau \ne 0). It is also independent and identically distributed (i.i.d.).
  • Deterministic trend: Predictable change in the series over time. Use the trend stationary (TS) approach.
  • Stochastic trend: Unpredictable change, often caused by a unit root. Use the difference stationary (DS) approach 40.
  • Integrated stochastic process (Yt∼I(d)Y_t \sim I(d)): A non-stationary process that becomes stationary after differencing dd times. Yt∼IY_t \sim I if it's already stationary 41.
  • Random Walk Model (Yt=Yt−1+ZtY_t = Y_{t-1} + Z_t): A classic example of a non-stationary series with a stochastic trend where ZtZ_t is white noise. Its variance increases over time 42.

Stochastic trends impact long-run development; deterministic trends do not.

3.5 Testing for stationarity

3.5.1 Graphical analysis

  • Plotting the time series provides an initial idea of trends, seasonality, or stationarity.
  • This visual inspection guides the choice of formal statistical tests.

3.5.2 Unit root tests

  • Unit root test: Used to detect stochastic trends, which indicate non-stationarity.
  • The core idea is to test if a coefficient ρ\rho in Yt=ρYt−1+ZtY_t = \rho Y_{t-1} + Z_t is equal to 1. If ρ=1\rho=1, the series has a unit root and is non-stationary 43.
  • This is often rephrased as testing if δ=0\delta=0 in ∇Yt=δYt−1+Zt\nabla Y_t = \delta Y_{t-1} + Z_t, where δ=ρ−1\delta = \rho-1.
  • If δ=0\delta=0, the series is non-stationary and requires differencing. If δ<0\delta<0, it is stationary 44.

3.5.2.1 Dickey-Fuller (DF) test

  • The DF test uses a τ\tau (tau) statistic, with critical values adjusted by Dickey and Fuller.
  • It has three forms to account for:
  • No drift: ∇Yt=δYt−1+ut\nabla Y_t = \delta Y_{t-1} + u_t
  • With drift: ∇Yt=β0+δYt−1+ut\nabla Y_t = \beta_0 + \delta Y_{t-1} + u_t
  • With drift and trend: ∇Yt=β0+β1t+δYt−1+ut\nabla Y_t = \beta_0 + \beta_1 t + \delta Y_{t-1} + u_t.
  • Null Hypothesis (H0H_0): δ=0\delta = 0 (unit root present, non-stationary).
  • Alternative Hypothesis (H1H_1): δ<0\delta < 0 (no unit root, stationary) 46.
  • Rejection of H0H_0 implies stationarity (with zero mean, non-zero mean, or around a deterministic trend, depending on the model form).

3.5.2.2 Augmented Dickey-Fuller (ADF) test

  • The ADF test extends the DF test to handle autocorrelated errors by adding lagged differences of ∇Yt\nabla Y_t.
  • It uses the same null and alternative hypotheses and test statistic as the DF test but requires different critical values.
  • The number of lagged differences (mm) is chosen until errors are white noise 47.

ADF tests are robust to autocorrelated errors, making them more reliable.

3.5.3 Autocorrelation function (ACF) and Correlogram

  • The sample autocorrelation function (rkr_k) measures the linear relationship between observations kk units apart 48.
  • A correlogram is a plot of rkr_k against lag kk.
Series TypeCorrelogram Characteristics
Purely Random (White Noise)Most autocorrelations are insignificant; no clear pattern. 49
StationaryLarge r1r_1, then a few significant smaller lags, decaying to near zero. 50
Non-stationary (Trend)Autocorrelations decay slowly to zero only for very large lags.
SeasonalOscillations at the seasonal frequency, superimposed on other patterns. 51

Correlogram patterns indicate stationarity or trends.

3.5.4 Autocorrelation test

  • Tests if sample autocorrelations rkr_k are significantly different from zero.
  • For large samples, rkr_k is approximately normally distributed with variance 1/n1/n 52.
  • A (1−α)×100%(1-\alpha) \times 100\% confidence interval for ρ(k)\rho(k) is rk±zα/21/nr_k \pm z_{\alpha/2} \sqrt{1/n}.
  • If zero is not in the confidence interval for rkr_k, reject H0:ρ(k)=0H_0: \rho(k)=0 53.

Confidence intervals help determine if autocorrelations are statistically significant.

🔑 Important: Unit root tests and ACF/correlogram analysis are crucial for determining if a time series is stationary, which is a prerequisite for many time series models.

4. Stochastic models for time series

Stochastic models incorporate uncertainty to represent real-world processes. These models are essential for analyzing time series data where randomness plays a significant role.

Common types include random walk, moving average, autoregressive, and mixed models.

4.1 Moving average models

A moving average process of order qq, denoted as MA(qq), is defined by a linear combination of past white noise terms. The process {Xt}\{X_t\} is an MA(qq) if it can be expressed as: Xt=∑i=0qβiZt−iX_t = \sum_{i=0}^{q} \beta_i Z_{t-i} where {Zt}\{Z_t\} is a white noise process with mean zero and variance σz2\sigma_z^2, and βi\beta_i are constants 56.

  • Stationarity: MA processes are generally stationary because their mean is constant and their autocovariance is time-independent.

  • Order Identification: The order qq of an MA process is determined by the maximum time lag of the white noise terms present in the model equation. For example, Yt=Zt−0.1Zt−1+0.25Zt−3Y_t = Z_t - 0.1Z_{t-1} + 0.25Z_{t-3} is an MA process 3.

Invertibility of MA processes

An MA process is invertible if all roots of its characteristic equation lie outside the unit circle (i.e., their absolute values are greater than 1). This condition ensures that the model can be represented as an infinite AR process.

4.2 Autoregressive models

An autoregressive process of order pp, denoted as AR(pp), expresses the current value of a time series as a linear combination of past values and a white noise term 59.

The AR model is given by Xt=αXt−1+ZtX_t = \alpha X_{t-1} + Z_t, where Zt∼WN(0,σ2)Z_t \sim WN(0, \sigma^2).

  • Stationarity of AR : An AR model is stationary if and only if ∣α∣<1|\alpha| < 1. If α=1\alpha = 1, the model becomes a random walk (Xt=Xt−1+ZtX_t = X_{t-1} + Z_t), which is non-stationary 1.

  • Stationarity of AR(p): For an AR(pp) model, stationarity is achieved when all roots of its characteristic equation are outside the unit circle (absolute values greater than 1).

AR models are like a chain reaction: past values directly influence the present.

4.3 Mixed models (ARMA)

Mixed models combine autoregressive (AR) and moving average (MA) terms. An Autoregressive Moving Average model of order (p,qp, q), or ARMA(p,qp, q), includes pp AR terms and qq MA terms.

Xt=∑i=1pϕiXt−i+∑j=0qβjZt−jX_t = \sum_{i=1}^{p} \phi_i X_{t-i} + \sum_{j=0}^{q} \beta_j Z_{t-j}

  • Stationarity: The stationarity of an ARMA model depends solely on its AR part. It is stationary if all roots of the characteristic equation Φ(y)=0\Phi(y) = 0 are greater than 1 in absolute value. The MA part is always stationary.

  • Invertibility: The invertibility of an ARMA model depends on its MA part. It is invertible if all roots of the characteristic equation Θ(y)=0\Theta(y) = 0 are greater than 1 in absolute value.

  • Principle of Parsimony: ARMA models are favored because they can often represent a stationary time series with fewer parameters than pure AR or MA models, leading to more parsimonious representations.

ARMA models balance past values (AR) with past errors (MA) for a comprehensive view 61.

4.4 Models for non-stationary and seasonal time series

Integrated Autoregressive Moving Average (ARIMA) models

ARIMA models are used for non-stationary time series, typically by differencing the series to achieve stationarity. An ARIMA(p,d,qp, d, q) model is essentially an ARMA(p,qp, q) model applied to the dd-th differenced series (Wt=ΔdXtW_t = \Delta^d X_t).

ϕ(L)(1−L)dXt=θ(L)Zt\phi(L) (1-L)^d X_t = \theta(L) Z_t

Here, LL is the lag operator, (1−L)d(1-L)^d represents the differencing operation dd times, ϕ(L)\phi(L) is the AR characteristic polynomial, and θ(L)\theta(L) is the MA characteristic polynomial.

Seasonal Autoregressive Moving Average (SARMA) and Seasonal ARIMA (SARIMA) models

These models extend ARMA and ARIMA models to capture seasonality in time series data. They include both non-seasonal and seasonal components.

  • SARMA (p,qp, q) (P,QP, Q)s: This model incorporates seasonal AR terms of order QQ and seasonal MA terms of order PP with a seasonal period ss.

  • SARIMA (p,d,qp, d, q) (P,D,QP, D, Q)s: This model extends SARMA by allowing for seasonal differencing (DD) and non-seasonal differencing (dd).

Seasonal models account for recurring patterns that repeat at fixed intervals 63.

🔑 Important: Understanding stationarity and invertibility conditions is crucial for selecting appropriate stochastic time series models (#page=57 #page=58 #page=60 #page=62) 57 58 60 62.

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also