Demeand ARMA(p,q):

$$ \begin{align} x_t & \, \overbrace{:=}^{\text{ARMA(p,q)}} \, \phi_1 \times x_{t-1} + \phi_2 \times x_{t-2} + \dotsc + \phi_p \times x_{t-p} + \epsilon_t +\theta_1 \times \epsilon_{t-1} + \dotsc +\theta_q \times \epsilon_{t-q} , \quad x_0 = 0, \end{align} $$

When to use ARMA instead of AR or MA

If both ACF and PACF plots demonstrate a gradual decreasing pattern, then the ARMA process should be considered for modeling.

Example

Both ACF and PACF show slow decay (gradual decrease). Hence, the ARMA(1,1) model would be appropriate for the series.

Again, observing the ACF plot: it sharply drops after two significant lags which indicates that an MA (2) would be a good candidate model for the process.

Therefore, we should experiment with both ARMA(1,1) and MA(2) for the process and later select the optimal model based on a performance metric like AIC (Akaike Information Criteria).

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/dbc547b7-05f1-4d4d-99d3-976202440e96/v43vr0bc.bmp

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/8adb247b-7bd6-4699-b2e0-2cde802456cb/mie3lf5d.bmp