A moving average (MA) process is essentially created by lagging the residual term of the time series. For example a time series x with an autoregressive (AR) process of length 1 and a moving average process of length 2 can be expressed as x(t) = x(t-1) + e(t) + e(t-1) + e(t-2). In general, a time series can be represented by an ARMA(p,q) process, where p denotes the length of the autoregressive process, while q denotes the length of the moving average process.