## 2 Materials and Methods
### Considerations about the Types of Distributions of the Parameters of the Vision Subsystem
#### 2.2.2 Model for Calculating Uncertainties  
As can be deduced from the scientific literature, the Monte Carlo method is fit to determine the uncertainty of the previous values \(d_{k}\) distances. This method is divided into the following steps that were particularized for our mathematical model:  
1. Definition of output variables: the distance \(d_{k}\) between the zero gradation and the line \(k\)-th graduation. 2. Definition of input quantities: determining the \(d_{k}\) distances has the following input variables: the light intensity of the pixels \(I\left(i,j\right)\) of the image of the glass line scale and the results of the calibration of the vision subsystem materialized by \(\mathbf{K}^{-1},u_{r},v_{r},k_{1},k_{2},s_{1},s_{2},p_{1},p_{2}\), i.e., the inverse calibration camera matrix, the centre of geometric distortion and geometric distortion coefficients. If the results are corrected for the effect of temperature, it is necessary to employ the linear expansion coefficient \(\alpha\) of the glass line scale and the temperature difference of the glass line scale \(\Delta T\) with respect to the reference. 3. Assignment of the PDF to the input variables: The uncertainty associated with the light intensity of the pixels is obtained according to the work of [PERSON] et al. [20]. The uncertainty of the variables is determined by the hypothesis considered: * Hypotheses 1 and 2: It can be difficult to generate random data with dependence when they have distributions that are not from a standard multivariate distribution. Indeed, some of the standard multivariate distributions can model only some limited types of dependence. In these cases, copulas are often used [21]. These functions can describe dependencies between variables and provide distributions that model correlated multivariate data. Its use allows the construction of bivariate or multivariate distribution by specifying marginal univariate distributions. For this, it is necessary to choose the type of copula so as to allow generating a correlation structure between variables. To simulate multivariate variables in this paper the following steps are followed: * Simulation of a multivariate normal with zero mean and covariance matrix unit. * Calculation of a multivariate normal with zero mean and covariance matrix \(\mathbf{U_{C}}\), which is the covariance matrix of the calibration results of the vision subsystem, Equation (4): \[\mathbf{U_{C}}=\left( \begin{array}{cccc}u^{2}\left(\mathbf{K}^{-1}\left(1,1 \right)\right)&u^{2}\left(\mathbf{K}^{-1}\left(1,1\right),\mathbf{K}^{-1} \left(1,2\right)\right)&\cdots&u^{2}\left(\mathbf{K}^{-1}\left(1,1\right),p_{ 2}\right)\\ u^{2}\left(\mathbf{K}^{-1}\left(2,1\right),\mathbf{K}^{-1}\left(1,1\right) \right)&u^{2}\left(\mathbf{K}^{-1}\left(1,2\right)\right)&\cdots&u^{2}\left( \mathbf{K}^{-1}\left(1,2\right),p_{2}\right)\\ \vdots&\vdots&\ddots&\vdots\\ u^{2}\left(p_{2},\mathbf{K}^{-1}\left(1,1\right)\right)&u^{2}\left(p_{2}, \mathbf{K}^{-1}\left(1,2\right)\right)&\cdots&u^{2}\left(p_{2}\right)\end{array}  \right).\] (4) * Prior transformation of normal uniforms, whose values are contained in the interval \(\left[0,1\right]\). * It is possible to obtain the variable \(c_{i}\) from the variable using the inverse function \(F^{-1}\left(u_{i}\right)\): \[c_{i}=F^{-1}\left(u_{i}\right).\] (5) In the case of Hypothesis 1, the probability distribution function \(F\left(x\right)\) is estimated using a kernel density estimation (KDE) [22; 23]; in the case of Hypothesis 2, the probability distribution function \(F\left(x\right)\) is a known, univariate marginal distribution (normal, \(t\)-student,... ). * Hypothesis 3: The uncertainty of the variables \(\mathbf{c}=\left(\mathbf{K}^{-1},u_{r},v_{r},k_{1},k_{2},s_{1},s_{2},p_{1},p_{2}\right)\) is calculated from the covariance matrix obtained in the calibration of the vision subsystem. As noted in Section 2.1, these variables are correlated. This hypothesis assumes that the above variables have PDF equivalent to Gaussian distributions.