Reading: Chapter 1.3-1.7 – Shumway and Stoffer
Today¶
Autocovariance, autocorrelation, cross-covariance, cross-correlation
Stationarity
Covariance of linear combinations of random variables¶
If we have random variables and that are linear combinations of (finite variance) random variables and , then the covariance of these is:
Autocovariance of a random walk¶
Recall that a random walk (with or without drift) is:
The are uncorrelated random variables.
In this case, the autocovariance does depend on the particular and chosen.
What if we want a bounded measure?
Autocorrelation function¶
We can calculate the autocorrelation function (ACF) as:
This measures the linear predictability of the time series at time () using . The Cauchy-Schwarz inequality states that:
We can also extend this to looking at the linear predictability of one time series to another, by extending into the concepts of cross-covariance and cross-correlation.
Cross-covariance¶
Between two time series and :
This tells us how the values in relate to the values in over time.
Let’s think about a simple example:
What is (for lag )? At what lag is maximized?
We can also have the normalized version:
Cross-correlation¶
This is bounded such that
Stationarity¶
Recall that for a moving average, the autocovariance depends only on the time separation between and (also called the lag). This is important because this implies the concept of stationarity.
A strictly stationary time series is one where every collection of values has identical probabilistic behavior to the time-shifted set:
(that is, same mean, variance, higher-order moments for all ). Examples: iid process
This is not true for most applications and is too strict of a definition. So instead, we will introduce the concept of weak stationarity. In your book this is just called “stationary” as short hand.
Weakly stationary¶
A weakly stationary time series is a finite variance process where:
The mean function is constant and doesn’t depend on
The autocovariance function depends on and only through their difference .
This is convenient because we can then estimate things about time series where we don’t have multiple repeated observations (and thus we can’t actually estimate the variability for a given time sample directly). In a stationary time series, the mean function is independent of time, so we have:
We can also simplify the autocovariance function so that it is only dependent on the time shift / lag. For example, if , is the lag between and . We then have:
The autocovariance of a (weakly) stationary time series is thus:
In your lab, you will look at the stationarity of white noise (strictly stationary), moving average (weakly stationary), random walks (not stationary), and linear trends (not stationary).
If mean and/or autocovariance change with time, your time series is not stationary
Estimating covariance of a single time series¶
Much of the time we don’t have multiple samples of our time series, so we can’t estimate separately for each . If we assume stationarity, , so we can use the sample mean instead of :
,
where is the sample mean. Also, for .
This is nice because we can always calculate the sample autocovariance. However, whether it is interpretable or meaningful will depend on whether the stationarity assumption is approximately true.
Estimating relationships between two time series¶
We can use cross-correlation to estimate relationships between two series and . For signals that are jointly weakly stationary:
Here is an example of the autocorrelation functions for the Southern Oscillation Index, fish recruitment, and their relationship (cross-correlation function):


Next time:¶
Linear regression (Chapter 2 SS)