**4. Magnitude grouping**

By grouping the original sequence by magnitude, 390 points of data for the Ms. ≥ 3.0 sequence and 58 points of data for the Ms. ≥ 4.0 sequence are obtained. After analyzing and modeling each sequence according to the above steps, we consider fitting Xd3 with model ARIMA(7,2,1) (0,1,1)s and Xd4 with model ARIMA (3,2,1) (0,1,0)s. The comparison of each group's models in different periods is shown in **Tables 4** and **5**.

According to the above principles, we use s = 7, s = 16, and s = 32 to make shortterm, medium-term, and long-term predictions for Xd3, respectively. The prediction model is ARIMA(7,2,1) (0,1,1)7 ,ARIMA(7,2,1) (0,1,1)16,and ARIMA(7,2,1) (0,1,1)32. For Xd4, due to the small amount of earthquake sequence data with an Ms. ≥ 4.0, it is difficult to capture the long period changing trend, and the fitting effect of those long period models is poor. In addition, the fitting effect of the shortperiod models is unsatisfactory. The Xd4 sequence only shows an obvious medium periodic. Therefore, the medium-term prediction of Xd4 is made with s = 11, and the prediction model is ARIMA (3,2,0) (0,1,0)11. The fitting effects of different models of sequences are shown in **Figures 8** and **9**.

The predicted results are compared with the true values, as shown in **Figures 10** and **11**. The long-term prediction of the Xd and Xd3 series shows that the model can capture their periodic changes, but the overall prediction value is higher than the real value.

Short-term prediction of Xd4 shows that ARIMA(3,2,0) (0,1,0)11 can predict well the development trend of this series in recent few times and does not show a high prediction result. The predicted RMSE of each model is shown in **Table 6**.


#### **Table 4.**

*Comparison of different periodic models of sequence Xd3.*


#### **Table 5.**

*Comparison of different periodic models of sequence Xd4.*

**Figure 8.**

*Fitting effect of the optimal model with different periods of sequence Xd3. A. ARIMA(7,2,1) (0,1,1)7. B. ARIMA(7,2,1) (0,1,1)16. C. ARIMA(7,2,1) (0,1,1)32.*

**Figure 9.** *Fitting effect of the optimal model of sequence Xd4.*

The average level of the true and predicted values of the series Xd and Xd3 is calculated. The average error of the models is 17.578 days at the lowest and 32.967 days at the highest. With reference to the general accuracy of the prediction of the earthquake occurrence time, the prediction error can be considered to be within an acceptable range. We use the predicted value to subtract the average error to correct the series predicted value. Taking ARIMA(9, 2, 1) x (0, 1, 1)22 for Xd and ARIMA(7, 2, 1) x (0, 1, 1)32 for Xd3 as examples, the correction effect is shown in **Figure 12**, which shows that the models have good prediction performance for trend and periodicity.

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

#### **Figure 10.**

*Comparison of prediction effects of optimal models with different periods of sequences Xd and Xd3. A. Prediction of Xd. B. Prediction of Xd3.*

**Figure 11.** *Prediction effect of the optimal model of sequence Xd4.*


#### **Table 6.**

*Prediction RMSE of different periodic models for each magnitude series.*

Since the prediction step of sequences Xd and Xd3 is more than 40, which may reduce the prediction accuracy, we consider making 15-step predictions for sequence Xd and 5-step predictions for sequence Xd3, which has a relatively small data volume. Taking the above two models as examples, the prediction results are shown in **Figure 13**. The predicted RMSEs are 10.6860 and 8.8009, respectively. There is no

**Figure 12.** *Prediction effects after correction of sequences Xd and Xd3.*

**Figure 13.**

*Prediction effects of sequences Xd and Xd3 after reducing prediction times.*

**Figure 14.** *Prediction results of new data (Ms* ≥ *4.0) in the Longmenshan fault zone in 2022.*

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

obvious trend of the earthquake occurrence interval predicted by sequence Xd, while the prediction sequence of Xd3 has a slightly increasing trend.

Two new datasets for an earthquake sequence with an Ms. ≥ 4.0 in the Longmenshan fault zone as of March 6, 2022 are added, and the ARIMA(3, 2, 0) x (0, 1, 0)11 model is used to predict the time interval series. Comparing the predicted value with the true value, as shown in **Figure 12**, the predicted RSME is 55.7112. It is found that the trend is still captured well, and the model accuracy can be further improved on this basis (**Figure 14**).

### **5. Conclusion**

This paper proposes to use SARIMA to model the time series from the perspective of the time interval of the Longmenshan fault zone, analyze the hidden information of the earthquake time series, and predict the next earthquake occurrence time. According to the model analysis and prediction results, the following conclusions are drawn: (1) The SARIMA model is applicable to the analysis and prediction of earthquake time interval series. The optimal model adjusted R<sup>2</sup> value of each series is above 0.86, up to 0.911. (2) For long-term prediction, the models of series Xd and Xd3 have higher prediction values than the true values, and the prediction performance for lower values (time interval approaching 0) is relatively poor. (3) In short-term prediction, the optimal models of sequences Xd and Xd3 have good prediction effects and can predict the sequence periodicity well. The prediction result of Xd3 shows a slight fluctuation growth trend; that is, the number of earthquakes with an Ms. ≥ 3.0 in the Longmenshan fault zone decreases slightly. The periodicity of sequence Xd4 is obvious, and in short-term prediction, the model can capture well its development. The prediction trend is consistent with the real situation. The prediction accuracy of the model can be further improved.

*Natural Hazards – New Insights*
