**The relationship between the MA(q) process and ACF**

Assume that are i.i.d. random variables with mean 0 and variance . The * moving average process of order * (or the

*process) has the form*

**MA(q)**Note that the RHS actually has (not ) terms in total. (Also in many references, is constrained to be equal to 1; here I have left it unconstrained.)

For a weakly stationary process , its * autocovariance function* is defined as

(The second equality is true if for all , which is usually the case in these settings.) Its * autocorrelation function (ACF)* is defined as

* For an MA(q) process, the ACF cuts off after lag q.* That is,

This fact can be verified by directly plugging the definition of the MA(q) process into the definition for the autocovariance function. Here is a little simulation demonstrating this fact for an MA(3) process:

set.seed(1) x <- arima.sim(list(ma = c(1, 0.5, 1)), n = 2000) acf(x, main = "Autocorrelation function for x")

The ACF cuts off after lag 3. Note that there are 4 (not 3) significantly non-zero lines: one for lag 0 (we always have ) and 3 for the 3 positive lags. For an MA(q) process, we expect to see “peaks” in the ACF plot.

This can be used as a method to determine the order of a moving average process: estimate the ACF and the largest lag with significantly non-zero autocorrelation is the order of the process. (Note, however, that If you try different random seeds or different coefficients, the break between the non-zero and zero autocorrelations is not always obvious.)

**The relationship between the AR(p) process and PACF**

The * autoregressive process of order * (or the

*process) has the form*

**AR(p)**Here there are terms on the RHS, with one of them belonging to the process and of them belonging to the process. The coefficient of is constrained to be 1.

For a weakly stationary process , its * partial autocorrelation function* is defined by

This is basically the same formula as that for the ACF except we condition on .

* For an AR(p) process, the PACF cuts off after lag p.* That is,

Here is a simulation illustrating this for an AR(3) process:

set.seed(1) x <- arima.sim(list(ar = c(1, -0.6, 0.4)), n = 2000) acf(x, type = "partial", main = "Partial autocorrelation function for x")

Note that the PACF plot starts at 1, not 0 like the ACF plot. As expected, the PACF is essentially zero for lags above 3. For an AR(p) process, we expect to see “peaks” in the PACF plot.

This can be used as a method to determine the order of an autoregressive process: estimate the PACF and the largest lag with significantly non-zero partial autocorrelation is the order of the process.