Ljung-Box檢定
外觀
此條目可參照英語維基百科相應條目來擴充。 (2025年11月2日) |
Ljung-Box檢驗,又稱增強的Box-Pierce檢驗[1]或Portmanteau檢驗[2], 是一個統計學檢驗,由Greta M. Ljung和George E.P. Box設計[3],旨在用於檢驗時間序列模型是否存在自相關性(擬合不足),該檢驗使用兩個假設:H0和H1,H0代表殘差的分布是獨立的(也就代表數據可能是白噪聲),而H1則代表殘差的分布體現了一定的自相關性[4][5][6][7]。
公式
[編輯]我們在得到Q值後,就要根據alpha(統計顯著性指數,通常為0.05),判斷這個Q值的含義:
如果真,那麼可以判定該數據滿足H1假設,否則就代表該數據滿足H0假設[4]。
在這個公式之中,有兩個特別且重要的符號,分別是和 。
- n
- p(k)
在常見程式語言的實現
[編輯]- R
在R中,可通過Box.test函數並指定參數type為Ljung來調用該檢驗[5][8]。
- Python
在statsmodels庫里,可通過acorr_ljungbox()函數來調用該檢驗[9][10]。
參考資料
[編輯]- ^ Box, G. E. P.; Pierce, David A. Distribution of Residual Autocorrelations in Autoregressive-Integrated Moving Average Time Series Models. Journal of the American Statistical Association. 1970-12, 65 (332): 1509–1526. doi:10.1080/01621459.1970.10481180.
- ^ T.2.3 - Testing and Remedial Measures for Autocorrelation | STAT 501. STAT 501: Regression Methods. 賓夕法尼亞州立大學 (英語).
- ^ 3.0 3.1 3.2 Understanding The Ljung-Box Test: A Comprehensive Guide To Time Series Autocorrelation - PSYCHOLOGICAL STATISTICS. statistics.arabpsychology.com. PSYCHOLOGICAL STATISTICS. [2025-11-02].
- ^ 4.0 4.1 Ljung Box Test: Definition. Statistics How To. 2018-09-07 [2025-10-30] (英語).
- ^ 5.0 5.1 5.2 5.3 5.4 Zach Bobbitt. Ljung-Box Test: Definition + Example. Statology. 2020-02-14 [2025-10-30] (英語).
- ^ 6.0 6.1 6.4.4.8.1. Box-Ljung Test. 國家標準技術研究所. [2025-10-30] (美國英語).
- ^ 7.0 7.1 G. M. Ljung; G. E. P. Box. On a measure of lack of fit in time series models. Biometrika. 1978-08-01, 65 (2): 297–303. doi:10.1093/biomet/65.2.297.
- ^ R Doc Authors. box.test: Box-Pierce and Ljung-Box Tests. rdrr.io. [2025-10-30] (英語).
- ^ Zach Bobbitt. How to Perform a Ljung-Box Test in Python. Statology. 2020-10-15 [2025-10-30] (英語).
- ^ Statsmodel Developers. statsmodels.stats.diagnostic.acorr_ljungbox - statsmodels 0.14.4. Statsmodel Docs. [2025-10-30] (英語).