Solution (source code)

= Solution

Use the <sample autocorrelation function> and <sample partial autocorrelation function> to look for approximate cutoffs. For a minimal causal <autoregressive model> of order $p$, the <partial autocorrelation function> is zero beyond $p$, while the <autocorrelation function> usually tails off, possibly with damped oscillation. For an invertible <moving-average model> of order $q$, the <autocorrelation function> is zero beyond $q$, while the <partial autocorrelation function> tails off. In a mixed <autoregressive moving-average model>, both generally tail off.

Thus the last visibly nonzero partial correlation suggests an autoregressive order, and the last visibly nonzero autocorrelation suggests a moving-average order. Finite samples do not produce exact zeros. Approximate white-noise reference bands can help flag clearly nonzero lags, but they are not universal <confidence intervals> for arbitrary correlated processes. Fit a few suggested orders and check residual <autocorrelation>, rather than treating these plots as a proof of the model order. This is <order identification by autocorrelation cutoffs>.