19.5 Moving Average Models

The moving average model presented in this chapter should not be confused with the concept of moving average (also known as rolling mean) which is familiar to many people. To avoid confusion, the term rolling mean is used for the latter. An example of a rolling mean is plotted below:

ggplot(covid,aes(x=date))+
     geom_line(aes(y=newcases/1000))+
     geom_line(aes(y=rollmean(newcases/1000,7,na.pad=TRUE,align="right")),
               color="red")+ylab("New Cases in Thousand")

A moving average term in a time series model is a past error (multiplied by a coefficient), e.g., MA(1): \[x_t = \mu + w_t + \theta_1 \cdot w_{t-1}\] where \(w_t \sim N(0,\sigma_w^2)\). The MA(1) model is written as: \[x_t = \mu + w_t + \theta_1 \cdot w_{t-1} + \theta_2 \cdot w_{t-2}\] And the properties of an MA(1) model are as follows:

  • \(E[x_t] = \mu\)
  • \(Var(x_t) = \sigma^2_w(1+\theta_1^2)\)
  • ACF is \(\rho_1 = \theta_1/(1+\theta_1^2)\) and \(\rho_h = 0\) for \(h \geq 2\)