Pre-Whitening Example of Two Time Series

Pre-whitening is a technique used in time series analysis to remove autocorrelation structures, making cross-correlation analysis between two series more meaningful. Below is a concrete numerical example demonstrating how to prewhiten one time series, apply the same filter to another series, and then compute cross-correlation on the resulting residuals.

Step-by-Step Numerical Example

  1. Generate Two Autocorrelated Time Series:

Suppose we have two time series x_t and y_t of length 10. We assume:

x_t = 0.8 * x_{t-1} + e_t
y_t = 0.8 * y_{t-1} + 0.5 * x_t + f_t

Here, e_t and f_t are white noise terms. After simulating, we might get:

x = [0, 0.5, 1.4, 0.92, 1.036, -0.1712, 0.06304, 0.750432, 0.1003456, 0.08027648]
y = [0, 0.05, 1.04, 0.792, 1.0516, 0.75568, -0.364, 0.284016, -0.0226272, 0.02203648]
  1. Fit an AR(1) Model to x_t and Determine the Filter:

From the form of x_t, we know it's approximately AR(1) with φ = 0.8. In practice, you’d estimate φ from the data, but we assume we know it here.

The prewhitening filter for AR(1) with φ=0.8 is:

W(L) = 1 - 0.8L
  1. Prewhiten x_t:

Apply the filter to remove the autocorrelation from x_t:

e_x(t) = x(t) - 0.8 * x(t-1)

This gives a residual series e_x that is closer to white noise.

  1. Apply the Same Filter to y_t:

We use the same filter on y_t to ensure we’re looking at comparable residuals:

E_y(t) = y(t) - 0.8 * y(t-1)

This produces a whitened version of y_t called E_y.

  1. Compute Cross-Correlation on the Residuals:

Now we have two filtered residual series e_x and E_y. Their cross-correlation is more meaningful because it is not dominated by autocorrelations present in the original data.

Why Pre-Whitening Helps

In practice, you would:

  1. Estimate the AR model for x_t, get φ.
  2. Prewhiten x_t to get e_x(t).
  3. Apply the same filter to y_t to get E_y(t).
  4. Compute cross-correlation between e_x and E_y.

This approach is common in signal processing and econometrics when analyzing relationships between nonstationary or autocorrelated time series.


Back to Time Series Normalization Techniques