The Ljung–Box test (named for 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
This article incorporates public domain material from websites or documents of the National Institute of Standards and Technology.
External links

Brockwell, Peter; Davis, Richard (2002). Introduction to Time Series and Forecasting (2nd ed.). Springer. p. 36.

Enders, Walter (2010). Applied Econometric Time Series (Third ed.). New York: Wiley. pp. 69–70.

Further reading

^ ^{a} ^{b} Box, G. E. P. and Pierce, D. A. (1970) "Distribution of Residual Autocorrelations in AutoregressiveIntegrated 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".

^ Davidson, James (2000). Econometric Theory. Blackwell. p. 162.
References
See also
Simulation studies have shown that the Ljung–Box statistic is better for all sample sizes including small ones.
and it uses the same critical region as defined above.

Q_\text{BP} = n \sum_{k=1}^h \hat{\rho}^2_k,
The BoxPierce test uses the test statistic, in the notation outlined above, given by^{[1]}
BoxPierce test
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 m  p  q.^{[3]}
where \chi_{1\alpha,h}^2 is the αquantile of the chisquared distribution with h degrees of freedom.

Q > \chi_{1\alpha,h}^2
where n is the sample size, \hat{\rho}_k is the sample autocorrelation at lag k, and h is the number of lags being tested. Under H_0 the statistic Q follows a \chi^2_{(m)}. For significance level α, the critical region for rejection of the hypothesis of randomness is

Q = n\left(n+2\right)\sum_{k=1}^h\frac{\hat{\rho}^2_k}{nk}
The test statistic is:^{[2]}

H_{0}: 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).

H_{a}: The data are not independently distributed.
The Ljung–Box test can be defined as follows.
Formal definition
Contents

Formal definition 1

BoxPierce test 2

See also 3

References 4

Further reading 5

External links 6
The Ljung–Box test is widely applied in econometrics and other applications of time series analysis.
and from which that statistic takes its name. The BoxPierce test statistic is a simplified version of the Ljung–Box statistic for which subsequent simulation studies have shown poor performance.
^{[2]}[1]
This article was sourced from Creative Commons AttributionShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, EGovernment Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a nonprofit organization.