# 4.7 Testing for Autocorrelations

In the previous section, we defined the notion of stationary and described techniques for transforming a time series that appears non-stationary into one that appears stationary. A next step is to specify a stochastic process as a model for the time series. Before we do so, it is worth assessing if terms of the time series appear independent. That would allow us to treat terms of the time series as a sample. We could then model the time series using statistical methods and not have to specify a stochastic process.

There is no general test for independence. All tests address specific properties of independence. Perhaps the most important property is that all autocorrelations be zero. Below we describe the Ljung and Box (1978) test for zero autocorrelations. It applies only to univariate time series, but it can be applied individually to components of a multivariate time series.

###### 4.7.1 Ljung and Box Test

Let {^{–α}** x**, … ,

^{–1}

**,**

*x*^{0}

**} be a realization of a segment of a time series**

*x***. The Ljung and Box test is a hypothesis test of the null hypothesis that autocorrelations of**

*X***are all zero for lags**

*X**k*= 1 through

*h*.

Define sample autocorrelations ρ* _{k}* as

[4.48]

where is the sample mean [4.4]. The Ljung and Box test statistic is

[4.49]

This is approximately centrally chi-squared with *h* degrees of freedom: *S* ~ χ^{2}(*h*,0), assuming . Accordingly, a significance level ε non-rejection region for will be the set of values *s* less than the 1 – ε quantile of *S*.

###### Exercises

Sample autocorrelations for a time series {^{–250}** x**, … ,

^{–1}

**,**

*x*^{0}

**} are calculated for lags**

*x**k*= 1 through 3 as 0.085, –0.027 and 0.109. Apply the Ljung and Box test. Does it reject the null hypothesis of zero autocorrelations at the .05 significance level?

Solution