# A Method of Accuracy Increment Using Segmented Regression
## 6 Real Data Example  
Consider the example of real data on the number of earthquakes with a magnitude of 7 or higher by year, according to the United States Geological Survey [78]. Table 5 presents the corresponding data from 1922 to 2021. \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \(i\) & \(X\) & \(Y\) & \(i\) & \(X\) & \(Y\) & \(i\) & \(X\) & \(Y\)  
Table 5 contains data observed from 1922 to 2021, where \(i\) is the number of observations, \(X\) is the year, and \(Y\) is the quantity of earthquakes. Figure 7 shows the graphical view of the dataset. To simplify the presentation and calculations, the first year of observation (1922) is assigned a zero point at the abscissa axis in the next computations. Thus, to return to the original data, it is necessary to add 1922 for the shifted abscissa axis. According to the visual analysis of the dataset, let us assume that there are five breakpoints in this realization. The following are the ranges for these breakpoints:  
\[x_{\text{br }1}=\{17;\ 18;\ 19;\ 20;\ 21\},\]  
\[x_{\text{br }2}=\{35;\ 36;\ 37;\ 38;\ 39\},\]  
\[x_{\text{br }3}=\{46;\ 47;\ 48;\ 49;\ 50\},\]  
\[x_{\text{br }4}=\{55;\ 56;\ 57;\ 58;\ 59\}\text{ and}\]  
\[x_{\text{br }5}=\{82;\ 83;\ 84;\ 85;\ 86\}.\]  
With such a range of variables, 3125 different SLR model options are available. The standard deviation is calculated for each case. As a result, a six-dimensional array \(\sigma(x_{\text{br }1},\ _{\text{br }2},\ _{\text{br }3},\ _{\text{br }4},\ _{\text{br }5})\) is generated. To approximate the obtained data, OLS is used on a six-dimensional optimization paraboloid. For simplicity, we used a simplified paraboloid as follows:  
\[ \begin{array}{ll}\Sigma(x_{\text{br }1},\ _{\text{br }2},\ _{\text{br }3},\ _{\text{br }4},\ _{\text{br }5})=-55431-3.085x_{\text{br }1}+4.832x_{\text{br }2}+79.227x_{\text{br }3}+33.495x_{\text{br }4}\\ +1251x_{\text{br }5}+0.0811x_{\text{br }1}^{2}-0.0651x_{\text{br }2}^{2}-0.8251x_{\text{br }3}^{2}-0.2937x_{\text{br }4}^{2}-7.445x_{\text{br }5}^{2}.\end{array} \]  
This simplified paraboloid has optimum standard deviation at the coordinates  
\[x_{\text{br }1\ \text{opt}}^{(\text{sim})}=19.01,\ x_{\text{br }2\ \text{opt}}^{(\text{sim})}=37.086,\ x_{\text{br }3\ \text{opt}}^{(\text{sim})}=48.008,\]  
\[x_{\text{br }4\ \text{opt}}^{(\text{sim})}=57.019,\ x_{\text{br }5\ \text{opt}}^{(\text{sim})}=84.005.\]  
After the calculation of the model's coefficients for the optimal case of breakpoint locations using OLS, the final SLR model is obtained:  
\[ \begin{array}{ll}\phi_{1}(X,\ _{\text{$\ell$}m_{1}}^{\rightarrow},\ x_{\text{br }q,\ 1})=10.197+0.1356X-0.3553(X-19.01)h(X-19.01)\\ +0.8002(X-37.086)h(X-37.086)-1.1212(X-48.008)h(X-48.008)\\ +0.7777(X-57.019)h(X-57.019)-0.4252(X-48.008)h(X-84.005).\end{array} \]  
Figure 7: Data on quantity of earthquakes of magnitude 7 or higher by year. The standard deviation for the obtained SLR model is equal to 3.799. Figure 8 shows the observed dataset and the final optimal SLR model. The method of simple enumeration for a given dataset gives approximately the same result as that shown in Figure 8. However, this method increases the computing time approximately twice. Polynomial regression using a seventh-order polynomial is characterized by a faster computation time; however, it gives unacceptable predictive properties. The results of the mathematical model building can be used for solving prediction problems. Consider this problem for the observed dataset based on generally known results that have been extensively described in the literature (for example, [76; 77]) and innovative methods that may be used in accordance with the properties of segmented regression models. To predict the future trend, let us determine the range of the SLR model change. For this purpose, we used a straight line and OLS to approximate the upper and lower ordinates of the breakpoints. The lower line contains the zero point, and the second and fourth breakpoints. The upper line contains the first, third, and fifth breakpoints.