**2. SARIMA model**

#### **2.1 Model theory**

The ARIMA model was first proposed by Box and Jenkins in the 1970s. Its full name is the differential autoregressive moving average model, denoted as ARIMA (p, d, q), where p and q represent autoregressive and moving average orders, respectively; d is the difference order, and the basic model structure is as follows:

$$\mathcal{Q}(B)\nabla^d \mathfrak{x}\_t = \Theta(B)\varepsilon\_t \tag{1}$$

In the formula, <sup>∅</sup>ð Þ¼ <sup>B</sup> <sup>1</sup> � <sup>∅</sup>1B � … � <sup>∅</sup>pB<sup>p</sup>∇<sup>d</sup> <sup>¼</sup> ð Þ <sup>1</sup> � <sup>B</sup> <sup>d</sup> is the autoregressive coefficient polynomial of order p, where B is the delay operator, and Bxt = xt-1; ∇*<sup>d</sup>* is the d-th order difference; and *<sup>Θ</sup>*ð Þ¼ *<sup>B</sup>* <sup>1</sup> � *<sup>θ</sup>*1*<sup>B</sup>* � … � *<sup>θ</sup>qBq* is the moving average coefficient polynomial of order q [30].

ARIMA can model nonstationary time series without seasonal effects. However, in real life, many time series have a certain periodicity. For the series that contains both

*Analysis and Prediction of the SARIMA Model for a Time Interval of Earthquakes… DOI: http://dx.doi.org/10.5772/intechopen.109174*

seasonal effects and long-term trend effects and a complex interaction between them, we can use the SARIMA model.

The general expression of the SARIMA model was originally proposed by Wang et al. (Wang et al., 2018) and is recorded as ARIMA p, d, q ð Þ� ð Þ P, D, Q s, where P and Q are seasonal autoregressive and seasonal moving average orders, respectively; D is the order of seasonal difference; and s is the number of seasonal cycles. As an extension of the ARIMA model, this model extracts seasonal effect information from the series by seasonal difference.

For the time series xt, the SARIMA model expression is as follows:

$$\nabla^{d}\nabla^{D}\_{\boldsymbol{s}}\mathfrak{x}\_{\boldsymbol{t}} = \frac{\theta(\boldsymbol{B})\theta\_{\boldsymbol{t}}(\boldsymbol{B})}{\mathfrak{Q}(\boldsymbol{B})\mathfrak{Q}\_{\boldsymbol{t}}(\boldsymbol{B})}\mathfrak{e}\_{\boldsymbol{t}}\tag{2}$$

**Figure 1.** *SARIMA model analysis flow chart.*

where ∇*<sup>D</sup> <sup>s</sup>* is the D seasonal difference in s steps; ε<sup>t</sup> is the random interference of the error term at time t; ∅sð Þ B and θsð Þ B represent the P-order seasonal autoregressive coefficient polynomial and Q-order seasonal moving average coefficient polynomial, respectively. The meanings of other variables are shown above.

#### **2.2 Forecast model construction**

For the prediction of small sample data, the traditional time series prediction model can fully extract the information and can also avoid overfitting. After analyzing the data characteristics, this paper chooses to use SARIMA to model the earthquake time series. As a traditional statistical prediction model, the SARIMA model has a good fitting degree to small sample data. It has high prediction accuracy and fast training speed and can reflect the dynamic changes in data. While capturing the trend of the series, the model can also extract its periodic fluctuations [17, 31].

To obtain the time interval sequence, we take the difference from the earthquake sequence. Then, we use SARIMA to model the data that are grouped according to the magnitude and obtain models with different parameters, model-fitting value series Y<sup>0</sup> t and predicted value series Y<sup>0</sup> <sup>t</sup> . To ensure that the model can extract short-term and long-term information and improve the accuracy of prediction in each period, long, medium, and short periods with the best modeling effect are selected, expressed as sa, sb, and sc. The model analysis flowchart is shown in **Figure 1**.
