2 Descriptive statistics for stationary time series.

2.1 Stationary series and autocorrelation.

2.1.1 Introduction. Many time series are evidently not IID - they may have long runs of values of the same sign, or show other patterns of association between successive values. Yet they often show a statistical similarity of appearance throughout their sample length. This may be after trends, seasonality and strong cyclical features have been removed by regression.

Differencing a time series, i.e. looking at the change from one sample point to another, may also lead to such an appearance, an example being inflation levels - monthly price increases - which are generally of more concern than the absolute price which continues its trend inexorably.

In this section we shall make simple assumptions about the structure of a single, or univariate time series so we shall now use the notation xt rather than yt which was more appropriate for the regression context.

The assumption that the statistical behaviour of a series is not changing as time progresses is called stationarity. It’s simplest description or measure uses the correlations between values in the series and leads to the following:

2.1.2 Definition. A time series xt is second order (weakly) stationary if

  • E(xt)=μx and  Var(xt)=σx2 are the same for all t.

  • For each k=0,1,2, Cov(xt,xt+k)=γx,k are the same for all t.

Note that γx,0=σx2. If we also consider negative lags

γx,-k=Cov(xt,xt-k)=Cov(xt-k,x(t-k)+k)=γx,k

The set of values γx,k is called the autocovariance function (of the lag) for the series xt.

Note: strict stationarity is that the joint pdf of any set of values of the series is the same as if they were all shifted in time by the same lag.

Also, a series is said to be Gaussian if this joint pdf is Normal. The assumption of second order stationarity and Gaussianity implies strict stationarity.

2.1.3 Definition. The autocorrelation function (acf) of a stationary time series xt is

ρx,k=corr(xt,xt+k)=γx,k/γx,0,k=0,1,2

Again is at times useful to think of ρx,k being defined also for negative k such that ρx,-k=ρx,k. Obviously ρx,0=1 always.

2.1.4 Examples.
(a) If xt is white noise then by definition ρx,k=0 for k0

(b) Take xt to be white noise and consider the constructed series yt=xt+xt-1. Then

γy,0=Var(yt)=Var(xt)+Var(xt-1)=2σx2
γy,1=Cov(xt+xt-1,xt+1+xt)=
Cov(xt,xt+1)+Cov(xt,xt)+Cov(xt-1,xt+1)+Cov(xt-1,xt)=0+σx2+0+0=σx2.

It is similarly found that γy,k=0 for k>1 so:

ρy,1=σx22σx2=12;ρx,k=0 for k>1.

Given a time series data set x1,x2xn the following estimates of the above quantities are used. Note however that they differ from the usual sample estimates used in statistics because they are not based on independent observations.

2.1.5 Time series sample estimates.

  • sample mean, an estimate of μxx¯=1nt=1nxt.

  • sample variance, an estimate of σx2:  sx2=1nt=1n(xt-x¯)2.

  • sample autocovariance, an estimate of γx,k:  Cx,k=1nt=1n-k(xt-x¯)(xt+k-x¯)  for k=0,1n and 0 if kn.

  • sample autocorrelation, an estimate of ρx,k :  rx,k=Cx,kCx,0.

Remark. The divisor of n is used for defining sx2 and Cx,k. Some authors use the divisor (n-k) when defining Cx,k.

Warning. These sample quantities can be automatically generated for any data set so the assumption of stationarity requires some check - usually a visual inspection of the series - before they are used.

In particular if the data contain trends, seasonality or cycles which appear deterministic and have not been removed by regression, then they will affect, and tend to dominate, the pattern of the sample acf, obscuring other statistical features. However, series may appear trend-like in a short sample yet stationary in the long term. The appearance depends on sample length. Figure 4 shows the sample autocorrelations of the residuals from the harmonic model fitted to the CO2 series. The figure also shows the series, the partial autocorrelations, and the sample spectral density (known as the periodogram), which we shall define later in this course. Figure 5 shows similar plots for the random series.

Figure 4: Link, Caption: Sample statistics of residuals from a regression model for Monthly CO2.
Figure 5: Link, Caption: Sample statistics of a random Gaussian time series.

2.2 The covariance matrix of a stationary time series.

Consider n successive time series values as a vector of random variables

Z=(xt+1xt+2xt+n)

where indicates transpose. For stationary series, the autocorrelation function determines their n×n correlation matrix as
2.2.1

Rn=(1ρ1ρ2ρn-1ρ11ρ1ρn-2ρ2ρ11ρ1ρn-1ρn-2ρ11)

and the covariance matrix is defined by Vn=σx2Rn.

The matrices Rn and Vn have special structure: the elements are the same down any diagonal. Such matrices are called Toeplitz matrices.

Covariance matrices are useful for calculating the variance of a linear combination of variables such as z=α1xt+1++αnxt+n=αx where α=(α1α2αn), as
2.2.2

Var(z)=σx2αRnα=σx2(α1α2αn)(1ρ1ρ2ρn-1ρ11ρ1ρn-2ρ2ρ11ρ1ρn-1ρn-2ρ11)(α1α2αn).

A simple example is to evaluate Var(x1+x2++xn) by taking α=(111). The result is just σx2 multiplied by the sum of the elements of Rn:
2.2.3

Var(x1+x2++xn)=σx2{n+2(n-1)ρ1+2(n-2)ρ2++2ρn-1}.

We can deduce

Var(x¯)=1n2Var(x1+x2++xn)=1nσx2{1+2[(1-1n)ρ1+(1-2n)ρ2++1nρn-1]}.

For large n this may be approximated by
2.2.4

Var(x¯)1nσx2(1+2j=1ρj).

A similar formula holds for the sample variance if the series is Gaussian, such that
2.2.5

Var(sx2)1n2σx4(1+2j=1ρj2).

Remark. For highly autocorrelated series precise estimation of the mean and variance is very difficult because of the high magnitude of 2j=1ρj and 2j=1ρj2 appearing in the variances.

2.3 Partial autocorrelation.

The autocorrelation measures the direct relationship between two values of a time series at different lags. In time series an alternative measure is the strength of association conditional upon the values in between.

2.3.1 Definition. The partial autocorrelation (pacf) at lag k for a stationary time series is

ρ|1=ρ1 and for k2,ρ|k=corr(xt,xt+k|xt+1,xt+2,,xt+k-1).

This may be calculated from the covariance matrix of xt,xt+1,,xt+k and so it depends only on ρ1,,ρk. The same quantities are in fact used when the Gaussian assumption is not appropriate, and we shall see later their value and interpretation in the context of model selection.

2.3.2 The sample partial autocorrelations.
Sample values r|k of the pacf ρ|k are calculated simply by using the sample values rk in place of the acf ρk in the calculations.

A similar warning to that given regarding sample autocorrelations also applies here, that any strong trends and other deterministic components not removed from the series will tend to dominate the appearance of the sample pacf.