# Ljung-Box Test in finite sample proof [duplicate]

Initially I have seen that in order to analyze residuals for finite sample, Ljung - Box is defined as $$n(n+2) \sum_{n=0}^h p_k^2/(n-k)$$ where $$n$$ is the sample size, $$p_k$$ is the sample autocorrelation at lag $$k,$$ and $$h$$ is the number of lags being tested. Actually I know the proof of formula when sample size goes infinity but in finite sample case there is a little adjustment. Also no sufficient information exist for that adjustment. Could you provide me with the proof?
• When you compare this formula to asymptotic case where n goes infinity, formula becomes just $n \sum_{n=0}^h p_k^2$. As you can see, for finite sample there are some adjustments. I would like to know how to derive those adjustments? – mertcan Apr 14 at 10:00