> [!tldr] > A moving average process $(X_{t})$ of order $q$, abbreviated $\mathrm{MA}(q)$, is a weighted sum of $q+1$ terms from a [[Purely Random Processes|purely random process]] $Z_{t}$: $X_{t}:= \beta_{0}Z_{t}+ \cdots + \beta_{q}Z_{t-q}$where $\beta_{0},\dots,\beta_{q}$ are constant weights. If the PRP $(Z_{t})$ has mean $\mu$ and variance $\sigma^{2}_{Z}$, then $\mathbb{E}[X_{t}]=\mu \sum_{i} \beta_{i}$ and $\mathrm{Var}(X_{t})=\sigma_{Z}^{2}\sum_{i}\beta_{i}^{2}$. By independence of $(Z_{t})$, the acv.f. of the MA process is: $\gamma(k)=\begin{cases} 0 &\text{if }k>q \\ \sigma^{2}_{z}\sum\limits_{i=0}^{q-k}\beta_{i}\beta_{i+k} \end{cases}$Hence the MA processes is [[Stochastic Processes#Stationarity|weakly stationary]], and if the PRP is a normal process, it is strictly stationary. ```R fold dev.off() prp <- rnorm(500, mean=0, sd=1) ma_data <- c(prp,0,0) - 0.7*c(0,prp,0) + 0.4*c(0,0,prp) par(mfrow=c(2,1), mar=c(3,4,3,4), bg=NA) plot(ma_data, type="l", ylab="Series Value", main="MA(2) Process") acf(ma_data, xlab="Time", ylab="Autocorr.", main="") ``` ![[MA2ACF.png#invert]] ### Invertibility A MA process is **invertible** if the original PRP can be written as a sum of the MA process $Z_{t}=\sum_{j=0}^{\infty}\pi_{j}X_{t-j}$such that $\sum_{j}|\pi_{j}|<\infty$. If the MA process is written as a polynomial of the backward shift operator $B$, $X_{t}=(\beta_{0}+\beta_{1}B+\cdots + \beta_{q}B^{q})Z_{t}=: \theta(B)Z_{t}$then an equivalent definition requires all the roots of $\theta(z)$ lies out side the unit circle.