The Ljung-Box Q statistic formula is:
Q(m)=nβj=1hβ(nβjn+2β)Οj2β=n(n+2)βj=1hβ(nβjΟj2ββ)
In this case, time lag m=3.
Thus,
Q(3)=300(302)[2990.252β+298(β0.1)2β+297(β0.05)2β]=22.74
Step-by-step calculation:
- n = 300 data points
- Οβ = 0.25, Οβ = -0.1, Οβ = -0.05
- Q(3) = 300 Γ 302 Γ [(0.0625/299) + (0.01/298) + (0.0025/297)]
- Q(3) = 90,600 Γ [0.000209 + 0.0000336 + 0.00000842]
- Q(3) = 90,600 Γ 0.00025102 = 22.74
The Ljung-Box Q statistic tests whether any of a group of autocorrelations of a time series are different from zero, and 22.74 is the correct calculated value.