# Earthquake Magnitude and Frequency Forecasting in Northeastern Algeria using Time Series Analysis
## 3 Methodology Outline  
The annual earthquake number series, denoted as \(\{N_{k};k\geq 0\}\), and the annual maximum magnitude in Northeastern Algeria that occurred during the period from 1910 to 2019, named \(\{m_{k},\,k\geq 0\}\), have been modelled using two different approaches. Initially, a parametric approach, abbreviated as ARIMA, was based on the Autoregressive Integrated Moving Average model, and a non-parametric approach was based on the Singular Spectrum Analysis model, abbreviated as SSA. ARIMA models [73], also known as Box-Jenkins models, are powerful tools in time series analysis aiming to describe the autocorrelations in the data and forecast values in the univariate time series that are non-stationaries, which are the time series with a trend component [74]. Usually, the notation _ARIMA_ (\(p\),\(d\),\(q\)) is used, where \(q\) is the parameter of the moving average (MA) model, \(p\) is the parameter of the autoregression (AR) model, and d is the number of the differentiation procedure necessary to ensure the stationarity in the series. The extensions to ARIMA models are the Seasonal Box-Jenkins models [75], which support the direct modelling of the seasonal component of the non-stationaries time series exhibiting both the trend and seasonal fluctuations [74]. For seasonal series of a given period \(S\), a Seasonal Autoregressive Integrated Moving Average (SARIMA, or  
Figure 2: Cumulative number of earthquakes above magnitudes Mw 4.0, 4.5, 5.0, 5.5, 6.0 and 6.5 vs. time (black circles). The straight lines (in red) show linear fits. Seasonal ARIMA) is introduced with the notation \(SARIMA(p,d,q)\times(P,D,Q)_{S}\), with \(P\) and \(Q\) being the orders of the seasonal autoregressive and seasonal moving average polynomials. Let \((X_{t})_{t\geq 0}\) be a time series. The \(ARIMA(p,d,q)\) equation model takes the form  
\[\Phi_{p}(B)\bigtriangledown^{d}X_{t}=\Theta_{p}(B)\epsilon_{t} \tag{1}\]  
where \(\epsilon_{t}\) is the error series representing the white noise of mean 0 and variance \(\sigma_{\epsilon}^{2}\), and  
\[\bigtriangledown^{d}=(1-B)^{d} \tag{2}\]  
represents the difference operator of order \(d\), being \(d\), the order of integration required to achieve the stationarity in the data. The polynomial  
\[\Phi_{p}(B)=1-\varphi_{1}B^{1}-\varphi_{2}B^{2}-\ldots-\varphi_{p}B^{p} \tag{3}\]  
corresponds to the AR term at the \(p\)th order and  
\[\Phi_{p}(B)=1-\varphi_{1}B^{1}-\varphi_{2}B^{2}-\ldots-\varphi_{p}B^{p} \tag{4}\]  
is the MA polynomial at the \(q\)th order [76]. The first stage in the Box-Jenkins analysis procedure is to ensure that the analyzed series is stationary; that is, free of trend and seasonal terms. The plot of the autocorrelation (ACF) and partial autocorrelation functions (PACF) are used to determine the parameters \(p\) and \(q\), which control substantially the model. According to [PERSON] and Metcalfe [77], for a second-order stationary time series, the autocovariance function of the lag \(k\) is given by  
\[\gamma_{k}=E[(x_{t}-\mu)(x_{t+k}-\mu)] \tag{5}\]  
noticing that the number of time steps between the variables is known as the lag. The lag \(k\) autocorrelation function (ACF) \(\rho_{k}\), is defined as  
\[\rho_{k}=\frac{\gamma_{k}}{\sigma^{2}} \tag{6}\]  
being \(\mu\) and \(\sigma^{2}\) the mean and the variance of the time series, respectively, where \(\rho_{0}=1\). In general, the partial autocorrelation function (PACF) of stationary time series at lag \(k\) is the \(k\)-th coefficient of a fitted AR(\(k\)) model; if the underlying process is AR(\(p\)), then the coefficients will be zero for all \(k>p\). It measures the correlation between observations that are separated by \(k\) time units (e.g., \(x_{t}\) and \(x_{t-k}\)) after removing the effect of any correlation resulting by the terms at shorter lags (e.g., \(x_{t-1}\),......... \(x_{t-k-1}\)).