The aim of the Durbin-Watson test is to verify if a time series presents autocorrelation or not. Specifically, let’s consider a time series , then evaluating an AR(1) model, i.e. we would like to verify if is significantly different from zero. The test statistic, denoted as , is computed as: The null hypothesis is the absence of autocorrelation, i.e. Under the Durbin-Watson statistic is approximated as . The test always generates a statistic between 0 and 4. However, there is not a known distribution for critical values. Hence to establish if we can reject or not when we have values very different from 2, we should look at the tables.
2 Breush-Godfrey
The Breush-Godfrey test is similar to Durbin-Watson, but it allows for multiple lags in the regression. In order to perform the test let’s fit an AR(p) model on the a time series , i.e. The null hypothesis is the absence of autocorrelation, i.e. The null hypothesis is tested looking at the F statistic that is distributed as a Fisher–Snedecor distribution, i.e . Alternatively is is possible to use the statistic, i.e. where is the R squared of the regression in Equation 2.
3 Box–Pierce test
Let’s consider a sequence of IID observations, i.e. . Then, the autocorrelation for the -lag can be estimated as:
Moreover, since , standardizing one obtain It is possible to generalize the result considering -auto correlations. In specific, let’s define a vector containing the first standardized auto-correlations. Due to the previous result it converges in distribution to a multivariate standard normal, i.e. Remembering that the sum of the squares of -normal random variable is distributed as a , one obtain the Box–Pierce test as where the null hypothesis and the alternative are Note that such test, also known as Portmanteau test, provide an asymptotic result valid only for large samples.
3.1 Ljung-Box test
Since the Box–Pierce test provide a consistent framework only for large samples, when dealing with a small samples it is preferable to use an alternative version, known as Ljung-box test, defined with a correction factor, i.e.
Independently from the statistic test used, i.e. or , in general both are rejected when where is the quantile with probability of the distribution with degrees of freedom. If we reject , the time series presents autocorrelation, otherwise if is non rejected we have no autocorrelation.