# Sugar Beet Profitability in Lubelskie Province, Poland
## 4 Discussion
### Forecasting Results  
The calculations were performed using Python 3.12.3. For forecasting, a mathematical model based on a discrete transfer function was developed [48]. ARIMA models were determined for seed prices, as well as for the prices of plant protection products and fertilizers. One of the key parameters for evaluating the quality of the forecasts is the RMSE (root mean squared error). The RMSE values for seed price forecasts, based on the selected models discussed in the methodology, are presented in Table 6.  
The smallest error values were obtained for the ARIMA(1, 1, 2) model, indicating that the data should be filtered rather than relying solely on results from previous years. This outcome likely reflects the impact of unpredictable political events, such as the war in Ukraine. Additionally, these results may have been influenced by the effects of the COVID-19 pandemic. For the ARIMA(1, 1, 2) model, the discrete transfer function \(G\)(z) and the continuous transfer function \(G\)(s) are given below:  
\[G(z)=\frac{z^{2}+0.0235z-0.9736}{(z-1)(z-0.9973)}\;G(s)=\frac{\left(0.00294 \times s^{2}+7.89415\times s+0.19994\right)}{(s\times(3.99467\times s+0.01066))} \tag{11}\]  
where  
z--complex variable (z-plane/Z-Domain)  
\(s\)--complex variable (s-plane/Laplace Domain). The pole of the transfer function lies outside the unit circle, indicating that the system is **unstable** (the stability margin is negative). The forecast based on the ARIMA(1, 1, 2) model is shown in Figure 9. \begin{table}
\begin{tabular}{c c} \hline \hline
**Model ARIMA** & **RMSE** \\ \hline \((1,\,1,\,1)\) & 337.22 \\ \((2,\,1,\,1)\) & 337.32 \\ \((1,\,1,\,2)\) & 335.66 \\ \((2,\,1,\,2)\) & 336.5 \\ \((0,\,1,\,1)\) & 336.48 \\ \((1,\,1,\,0)\) & 338.76 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: RMSE (root mean squared error) values for the determined models (for seed price). Figure 9: Forecast for the ARIMA(1, 1, 2) model for the seed price. Since the ARIMA(1, 1, 2) model was unstable [27], the ARIMA(1, 1, 1) model was determined and the transition function \(G(z)\) was calculated:  
\[G(z)=\frac{z^{2}+0.99135z}{(z-1)(z+0.27636)} \tag{12}\]  
where  
\(z\)--complex variable. For the determined transition function, the poles were as follows: function pole 1 = 1.0, function pole 2 = \(-0.2763\). The stability margin was determined to be 0.0; therefore, the system is on the verge of stability (Figure 10). Similarly to seed prices, modeling was performed for plant protection product prices. The following RMSE values were obtained for the selected models, are presented in Table 7.  
Model ARIMA(2, 1, 2) (Figure 11) exhibited the smallest error; therefore, a discrete transition function was determined for this model \(G(z)\):  
\[G(z)=\frac{-z\big{(}-z^{2}+0.01793z+0.97624\big{)}}{(z-1)((z^{2}+0.74807z-0.2516 2))} \tag{13}\]  
where  
\(z\)--complex variable. For the determined transition function, the poles were as follows: function pole 1 = \(-0.99975\), function pole 2 = 0.25168. The stability margin was determined to be 0.0002; therefore, the system is stable (all poles are inside the unit circle). \begin{table}
\begin{tabular}{c c} \hline
**Model ARIMA** & **RMSE** \\ \hline (1, 1, 1) & 491.93 \\ (2, 1, 1) & 491.91 \\ (1, 1, 2) & 491.39 \\ (2, 1, 2) & 489.51 \\ (0, 1, 1) & 491.71 \\ (1, 1, 0) & 493.99 \\ \hline \end{tabular}
\end{table} 
Table 7: RMSE (root mean squared error) values for the determined models (for plant protection product prices). Figure 10: Forecast for the ARIMA(1, 1, 1) model for the seed price. Similarly to seed and plant protection product prices, modeling was performed for fertilizer prices.