1. Learn
  2. /
  3. Courses
  4. /
  5. ARIMA Models in Python

Exercise

AR or MA

In this exercise you will use the ACF and PACF to decide whether some data is best suited to an MA model or an AR model. Remember that selecting the right model order is of great importance to our predictions.

Remember that for different types of models we expect the following behavior in the ACF and PACF:

AR(p)MA(q)ARMA(p,q)
ACFTails offCuts off after lag qTails off
PACFCuts off after lag pTails offTails off

A time series with unknown properties, df is available for you in your environment.

Instructions 1/2

undefined XP
    1
    2
  • Import the plot_acf and plot_pacf functions from statsmodels.
  • Plot the ACF and the PACF for the series df for the first 10 lags but not the zeroth lag.