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.