Ljung–Box test
This article needs additional citations for verification. (June 2011) |
The Ljung–Box test (named for Greta M. Ljung and George E. P. Box) is a type of statistical test of whether any of a group of autocorrelations of a time series are different from zero. Instead of testing randomness at each distinct lag, it tests the "overall" randomness based on a number of lags, and is therefore a portmanteau test.
This test is sometimes known as the Ljung–Box Q test, and it is closely connected to the Box–Pierce test (which is named after George E. P. Box and David A. Pierce). In fact, the Ljung–Box test statistic was described explicitly in the paper that led to the use of the Box-Pierce statistic,[1][2] and from which that statistic takes its name. The Box-Pierce test statistic is a simplified version of the Ljung–Box statistic for which subsequent simulation studies have shown poor performance.
The Ljung–Box test is widely applied in econometrics and other applications of time series analysis.
Formal definition
The Ljung–Box test can be defined as follows.
- H0: The data are independently distributed (i.e. the correlations in the population from which the sample is taken are 0, so that any observed correlations in the data result from randomness of the sampling process).
- Ha: The data are not independently distributed; they exhibit serial correlation.
The test statistic is:[2]
where n is the sample size, is the sample autocorrelation at lag k, and h is the number of lags being tested. Under the statistic Q follows a . For significance level α, the critical region for rejection of the hypothesis of randomness is
where is the α-quantile of the chi-squared distribution with h degrees of freedom.
The Ljung–Box test is commonly used in autoregressive integrated moving average (ARIMA) modeling. Note that it is applied to the residuals of a fitted ARIMA model, not the original series, and in such applications the hypothesis actually being tested is that the residuals from the ARIMA model have no autocorrelation. When testing the residuals of an estimated ARIMA model, the degrees of freedom need to be adjusted to reflect the parameter estimation. For example, for an ARIMA(p,0,q) model, the degrees of freedom should be set to .[3]
Box-Pierce test
The Box-Pierce test uses the test statistic, in the notation outlined above, given by[1]
and it uses the same critical region as defined above.
Simulation studies have shown that the Ljung–Box statistic is better for all sample sizes including small ones.[citation needed]
See also
References
- ^ a b Box, G. E. P. and Pierce, D. A. (1970) "Distribution of Residual Autocorrelations in Autoregressive-Integrated Moving Average Time Series Models", Journal of the American Statistical Association, 65: 1509–1526. JSTOR 2284333
- ^ a b G. M. Ljung; G. E. P. Box (1978). "On a Measure of a Lack of Fit in Time Series Models". Biometrika. 65 (2): 297–303. doi:10.1093/biomet/65.2.297.
- ^ Davidson, James (2000). Econometric Theory. Blackwell. p. 162. ISBN 0-631-21584-0.
Further reading
- Brockwell, Peter; Davis, Richard (2002). Introduction to Time Series and Forecasting (2nd ed.). Springer. p. 35–38. ISBN 0-387-94719-1.
- Enders, Walter (2010). Applied Econometric Time Series (Third ed.). New York: Wiley. pp. 69–70. ISBN 978-0470-50539-7.
- Hayashi, Fumio (2000). Econometrics. Princeton University Press. pp. 142–144. ISBN 0-691-01018-8.
External links
This article incorporates public domain material from the National Institute of Standards and Technology