## 2 Materials and Methods
### Statistical Method
\[\mathrm{w}_{\mathrm{x}_{0}}=\sqrt{\frac{1}{r}+\frac{1}{I}+\frac{\left(\mathrm{x} _{0}-\mathrm{x}\right)^{2}}{\sum_{i=1}^{1}\left(\mathrm{x}_{i}-\mathrm{x} \right)^{2}}} \tag{3}\]  
In Equation (2), \(\Delta(\alpha,\beta)\) is the value of the non-centrality parameter of a non-central t-distribution that depends exclusively on the probabilities \(\alpha\) and \(\beta\) and on the number of standards (I). This parameter models the changes in the probability distribution of the response when considering values lower than x\({}_{0}\). The distribution changes from being a Student's t with I \(-\) 1 freedom degrees to being a non-central Student's t distribution with the same degrees of freedom and with a non-centrality parameter equal to \(\Delta\). The limit of decision, CD\(\alpha\), will be then calculated as in Equation (4),  
\[\mathrm{CD}\alpha=\frac{\mathrm{y}_{\mathrm{c}}-\mathrm{\hat{a}}}{\mathrm{ \hat{b}}} \tag{4}\]  
where \(\mathrm{\hat{a}}\) and \(\mathrm{\hat{b}}\) are the estimated intercept and slope of the accuracy line, respectively, and \(\mathrm{y}_{\mathrm{c}}\), is the critical value that satisfies Equation (5) for a minimum permitted limit. \[\alpha=\mathrm{probability}\left\{\mathrm{y}<\mathrm{y}_{\mathrm{c}}|\mathrm{x }=\mathrm{x}_{0}\right\} \tag{5}\]  
Figure 2 shows a scheme of the hypothesis test that assesses, with an \(\alpha\) probability of false non-compliance and a probability \(\beta\) of false compliance, a minimum permitted or established limit. The accuracy line is shown in the upper left corner of the figure. The concentration, x, of the calibration samples is represented on the abscissa axis, and the values obtained using the PLS model using the NIR spectra of those same samples are represented on the ordinate axis. The two arrows indicate the pair (x\({}_{0}\), y\({}_{0}\)). The density function of the y values around y\({}_{0}\) is shown, and the probability \(\alpha\) is the area marked in red and described by Equation (5), which defines the critical value y\({}_{\mathrm{c}}\). With the recorded spectrum of a new sample, the corresponding y\({}_{\mathrm{P}}\) is obtained using the PLS calibration model. If this value is less than y\({}_{\mathrm{c}}\), then it will be concluded that the sample is non-compliant with a probability \(\alpha\). Nevertheless, the probability of false compliance, \(\beta\), is not being evaluated. As one moves toward lower values of concentration x, the mean of the density function decreases. At the value x\({}_{1}\) of the graph, there is a decrease in the mean of the density function and a larger one at x\({}_{2}\), and so on. In each one of these density functions, the probability of obtaining a value greater than the critical value, that is, \(\beta\), has been marked in blue. Clearly, \(\beta\) decreases as x moves away from x\({}_{0}\). On the other hand, the power curve (Operating Characteristic Curve) of the test is shown at the bottom right of Figure 3. Again observing the accuracy line graph, it is obvious (and there is mathematical proof of this) that indicating \(\beta\) is equivalent to indicating the shift in concentration, because the mean value of the distribution is related to the concentration based on the accuracy line. Additionally, CD\(\alpha\) is the value that corresponds to the accuracy line with the critical value y\({}_{\mathrm{c}}\) (Equation (4)), and it can be observed that for CD\(\alpha\), the probability of false compliance, \(\beta\), is 0.5. That means that 50% of the times that the test is applied, a false compliant result will occur. This situation always occurs, even if \(\alpha\) is small. In other words, if the test is not applied considering the requirement to guarantee the probability of false compliance, there will always be a probability equal to 0.5 of accepting that the sample is compliant when it is not. However, CD\(\beta\) (Equation (2)) guarantees that probability.