# Risk Assessment for Linear Regression Models in Metrology
## 3 Results and Discussion
### Comparison of Models by Root Mean Squared Error  
There are many evaluation metrics for regression [60,61]. The most common are the mean squared error (MSE) and the root of the mean squared error (RMSE). RMSE is a more suitable statistical indicator compared to MSE because it is measured in the same units as the targeted variable, which allows for easier interpretation and comparison of models [62]. RMSE values range from zero to infinity. Lower RMSE values, closer to zero, indicate better model performance [63]. This metric is sensitive to large deviations of the measured values from the reference values [64]. The comparison of risk models using the RMSE metric was conducted both graphically and quantitatively. The targeted variables in the model comparison were global producer's and consumer's risk and conformance probability. Comparisons were conducted for each point on the moderate scale \(\mathbf{x}\) and for all measurements \(\mathbf{y_{i}},\mathrm{i}=1,2,3\). If \(\mathrm{R_{C_{j,k_{j,1}}}},\mathrm{i}=1,2,3\) denotes the global consumer's risk, calculated for each realization of the sample \(\mathbf{y_{i}},\mathrm{i}=1,2,3\), then the RMSE for the global consumer's risk, for a chosen fixed value \(\mathrm{j}\in\{1,2,\ldots,\mathrm{n_{2}}\}\), can be calculated according to the following equation:  
\[\mathrm{RMSE}_{\mathrm{R_{C_{Y_{1}}}}}(\mathrm{j})=\sqrt{\frac{1}{\mathrm{n_ {3}}}\left[\sum_{k=1}^{\mathrm{n_{3}}}\left(\mathrm{R_{C_{k}}}(\mathrm{j})- \mathrm{R_{C_{k_{j,1}}}}(\mathrm{j})\right)^{2}\right]},\mathrm{k}=1,2,\ldots,\mathrm{n_{3}}. \tag{35}\]  
Analogously, by introducing the notations \(\mathrm{R_{P_{j,k_{j,1}}}}\) and \(\mathrm{p_{C|y_{i}}},\mathrm{i}=1,2,3\), the expressions for the RMSE of the individual measurements \(\mathbf{y_{i}},\mathrm{i}=1,2,3\) can be obtained for the global producer's risk and conformance probability, respectively. These metrics quantify the deviation of the calculated risk for each measurement point from the fitted risk surfaces shown in Figure 9, or from the fitted surfaces for conformance probability shown in Figure 10.  
The RMSE metric exhibits higher values for those points on the moderate scale for which the deviation of measured values is greater relative to the scale values (Figure 13). The calculated RMSE values indicate that models M3 and M4 better detect deviations of the risks, calculated for the points of the moderate scale, from the risk surfaces. This is particularly true for the sample realization \(\mathbf{y_{i}}\) on the negative part of the scale (Table 1). All the points on the moderate scale, for models M1 and M2, for each measurement \(\mathbf{y_{i}},\mathrm{i}=1,2,3\), and for each value of \(\mathrm{k}=1,2,\ldots,\mathrm{n_{3}}\), fall within the tolerance interval and acceptance interval. The same holds for all models, for measurements \(\mathbf{y_{i}},\mathrm{i}=2,3\) and for each value of \(\mathrm{k}=1,2,\ldots,\mathrm{n_{3}}\). For model M3, the value \(\mathrm{y_{1,2}}=-25.12\)\(\mathrm{\SIUnitSymbolMicro m}\) is already outside of the tolerance interval and acceptance interval for \(\mathrm{k}=1\). As consequences, there is a higher producer's and consumer's risk for the mentioned measurement, and ultimately, higher RMSE values for that measurement. For \(\mathrm{k}=1\), all other values of the negative portion of the moderate scale \(\mathbf{x}\) are outside the tolerance interval, that is, between the tolerance interval and the acceptance interval. From \(\mathbf{k}=8\) to \(\mathbf{k}=21\), all six measurements on the negative part of the moderate scale from sample \(\mathbf{y_{1}}\) are outside the tolerance interval and outside the acceptance interval. In the model M4, all points in the negative portion of the moderate scale are located outside the tolerance and acceptance intervals for \(\mathbf{k}=6\) to \(\mathbf{k}=21\).