Till now you have studied a few Auto Regressive models. None of them captured the seasonality of the series. In this segment, we will study an Auto Regressive model that captures seasonality as well. Let us hear more on the Seasonal Auto Regressive Integrated Moving Average or SARIMA model from Chiranjoy.

SARIMA brings all the features of an ARIMA model with an extra feature – seasonality.

**The non-seasonal elements of SARIMA**

- Time series is differenced to make it stationary.

- Models future observation as linear regression of past observations and past forecast errors.

**The seasonal elements of SARIMA**

- Perform seasonal differencing on time series.

- Model future seasonality as linear regression of past observations of seasonality and past forecast errors of seasonality.

**Example**

To forecast quarterly ice cream sales of 2020 using the Quarterly ice cream sales data for the last 4 years.

**Explanation**

- Historical sales follow a quarterly seasonality and in four years we get 16 data points.

- Future sales are related to past sales with lag = 4.

- Sales over the last 4 years is steadily increasing.

The above three points make clear that this example has a seasonal component.

**The parameters ‘p’, ‘d’, ‘q’ and ‘P’, ‘D’, ‘Q’: **

- Non-seasonal elements.

** p:** Trend Auto Regressive order.

** d:** Trend difference order.

** q:** Trend moving average order.

- Seasonal elements.

**m:** The number of time steps for a single seasonal perio.

**P:** Seasonal Auto Regressive order.

**D:** Seasonal difference order.

** Q:** Seasonal moving average order.

Now let us take a high-level look at the equations of SARIMA as well.

Equation for SARIMA(1,0,0)(0,1,1)4:

$$//${z}_{t=}\beta {z}_{t\u20131}+\varphi {\epsilon}_{t\u20134}+{\epsilon}_{t}\phantom{\rule{0ex}{0ex}}{z}_{t}={\gamma}_{t\u2013}{\gamma}_{t\u20134}$//$$

Let’s build the SARIMA on the Airline Passenger dataset using Python.

You can solve an optional model building assessment on ARIMA and SARIMA here.

In the next segment, you will study a method that captures seasonality and trend in a time series data with some exogenous variables.