Time Series • Time Series Regression Model
Time Series / P5.03 Multivariate Stationary Process

P5.03 Multivariate Stationary Process

Practical 5 Time Series Regression Model

Compare two constructed pairs: a stationary pair that wiggles around stable means, and a pair of wandering cumulative sums. Discuss why joint modelling is easier after the wandering is removed.

Practical / Solution

P5.03 Multivariate Stationary Process

Problem Statement

Compare two constructed pairs: a stationary pair that wiggles around stable means, and a pair of wandering cumulative sums. Discuss why joint modelling is easier after the wandering is removed.

Learning Outcomes

  • Describe stationarity as stable mean/variance/dependence.
  • See that two random walks can look spuriously related.
  • Difference wandering series before correlation claims.

Theory

A multivariate stationary process has means, variances and lag relationships that do not systematically change with time. Two nonstationary series can show a large correlation even when they are unrelated (spurious correlation). A teaching check is to difference each series and recompute correlation.

Dataset / Data Source

Two constructed bivariate samples of length 80: stationary noise, and independent random walks.

Analysis / Program

import numpy as np import pandas as pd rng = np.random.default_rng(3) n = 80 stat = pd.DataFrame({ "x": rng.normal(size=n), "y": rng.normal(size=n) }) rw = pd.DataFrame({ "x": np.cumsum(rng.normal(size=n)), "y": np.cumsum(rng.normal(size=n)) }) print("Stationary corr:\n", stat.corr().round(3)) print("Random-walk corr:\n", rw.corr().round(3)) print("Differenced RW corr:\n", rw.diff().dropna().corr().round(3))

Expected Output

Three 2×2 correlation matrices. Stationary independent series should show correlation near 0. Random walks may show a large accidental correlation. After differencing, that correlation should shrink toward 0 in this independent construction.

Result / Interpretation

Stationarity is about the process, not a single plot looking 'flat enough'. For multivariate work, check each series and their differences before treating a high correlation as a real link.

Note

Unrelated wandering series can look correlated. Difference or otherwise stationarise before strong claims.