The Ljung Box statistic, also known as the modified Box Pierce statistic, is a function of the accumulated autocorrelations, Οiβ up to time lag m. It's calculated as:
Q(m)=n(n+2)i=1βmβ(nβiΟi2ββ)
In this case, time lag = 3
Thus,
Q(3)=250Γ252(2490.32β)+250Γ252(248β0.152β)+250Γ252(247β0.12β)=31.04