# Risk Assessment for Linear Regression Models in Metrology
## 3 Results and Discussion
### Comparison of Models by Root Mean Squared Error
Analogously, the RMSE values for conformance probability are higher in points where the measured values significantly diverge from the values of the moderate scale, in contrast to measurements with minor deviations from the moderate scale (Figure S2). The total value of the RMSE for each model \(\mathrm{M_{I}},1=1,2,3,4\) for the consumer's risk, calculated for each measurement \(\mathbf{y_{i}},\mathbf{i}=1,2,3\), is denoted as \(\mathrm{R_{C}\_M_{I}},1=1,2,3,4\) and obtained from the equation:  
\[\mathrm{R_{C}\_M_{I}}=\sqrt{\frac{1}{n_{2}n_{3}}\left[\sum_{j=1}^{n_{2}}\sum_ {k=1}^{n_{3}}\left(\mathrm{R_{C_{k}}(j)-R_{C_{k|y_{1}}}(j)}\right)^{2}\right] },1=1,2,3,4. \tag{36}\]  
Expressions for the total value of RMSE for the global producer's risk and conformance probability are denoted as \(\mathrm{R_{P}\_M_{I}}\) and \(\mathrm{p_{C}\_M_{I}},1=1,2,3,4\), respectively. The values of these quantities are calculated analogously to the equation (36). Each measurement \(\mathbf{y_{i}},\mathbf{i}=1,2,3\) contributes to the determination of the parameters of the regression line and the determination of the risk surfaces and surfaces for the conformance probability [46; 47] (pp. 76-78). Therefore, the total RMSE value for global consumer's risk was additionally calculated for each model. This value is labeled as \(total\_\mathrm{R_{C}}\), and was calculated according to the following equation:  
\[total\_\mathrm{R_{C}}=\sqrt{\frac{1}{n_{1}n_{2}n_{3}}\left[\sum_{i=1}^{n_{1}} \sum_{j=1}^{n_{2}}\sum_{k=1}^{n_{3}}\left(\mathrm{R_{C_{k}}(j)-R_{C_{k|y_{1}} }(j)}\right)^{2}\right]}. \tag{37}\]  
The total value of RMSE for the global producer's risk, \(total\_\mathrm{R_{P}}\), and the total value of RMSE for conformance probability, \(total\_\mathrm{P_{C}}\), are obtained in the same manner as in  
Figure 13: The comparison of the RMSE values of each individual model, calculated in the values of the moderate scale \(\mathbf{x}\), for each sample realization \(\mathbf{y_{i}},\mathbf{i}=1,2,3\): (**a**) Consumer’s risk; (**b**) Producer’s risk. equation (37). The results of the quantitative analysis for all models, considering all defined values for RMSE given in equations (35)-(37), are presented in Table 4.  
Quantitative analysis revealed that models M3 and M4 are better at detecting deviations of measured values from values on a moderate scale. Consequently, all RMSE values for these models are higher compared to models M1 and M2. For all individual measurements \(\mathbf{y_{i}},\mathbf{i}=1,2,3\), it holds that \(\mathrm{R_{C}}\_\mathrm{M_{1}}<\mathrm{R_{C}}\_\mathrm{M_{2}}\), which is understandable given that model M1 has a broader tolerance interval compared to model M2. Furthermore, for RMSE values associated with the producer's risk, it holds that \(\mathrm{R_{P}}\_\mathrm{M_{1}}>\mathrm{R_{P}}\_\mathrm{M_{2}}\) for all measurements \(\mathbf{y_{i}},\mathbf{i}=1,2,3\). When comparing models M3 and M4, it was evident that for the first sample realization \(\mathbf{y_{1}}\), wherein significant deviations of the measured values from the reference values were observed in the negative part of the moderate scale, the RMSE values indicate that \(\mathrm{R_{C}}\_\mathrm{M_{3}}>\mathrm{R_{C}}\_\mathrm{M_{4}}\) and \(\mathrm{R_{P}}\_\mathrm{M_{3}}<\mathrm{R_{P}}\_\mathrm{M_{4}}\). For measurements \(\mathbf{y_{2}}\) and \(\mathbf{y_{3}}\), the reverse inequalities hold true. Additionally, it can be observed that for sample realization \(\mathbf{y_{2}}\), the RMSE values \(\mathrm{R_{P}}\_\mathrm{M_{3}}\) and \(\mathrm{R_{P}}\_\mathrm{M_{4}}\) were significantly higher compared to the values for measurements \(\mathbf{y_{1}}\) and \(\mathbf{y_{3}}\). Despite having a broader tolerance interval across almost all points on the moderate scale, model M3 exhibited higher RMSE values for \(total\_\mathrm{R_{C}}\), \(total\_\mathrm{R_{P}}\), and \(total\_\mathrm{P_{C}}\).