Run-Test
Hypothesis Testing
Let us denote the ARMA model obtained from time series analysis as $ARMA(p,q)$ to be $M$.
- $H_{0}$: $M$ is fit.
- $H_{1}$: $M$ is not fit.
Explanation
The Ljung-Box Test, also abbreviated as LBQ, is a test for determining the goodness-of-fit of an ARIMA model.
In 1970, Box and Pierce proposed the following test statistic $Q$, through the sACF $\hat{r}_{1} , \cdots , \widehat{r}_{k}$ of residuals obtained from ARIMA models. $$ Q = n \left( \hat{r}_{1}^{2} + \cdots + \widehat{r}_{k}^{2} \right) $$ $Q$ follows a chi-squared distribution with degrees of freedom $k-p-q$, allowing for goodness-of-fit testing, but could only be used when $n$ was sufficiently large. There were cases where it did not converge even when it was about $n=100$, but in 1978 Ljung and Box proposed an improved test statistic as follows. $$ Q_{*} = n(n+2) \left( {{\hat{r}_{1}^{2}} \over {n-1}} + \cdots + {{\widehat{r}_{k}^{2}} \over {n-k}} \right) \sim \chi^{2} ( k - p - q ) $$