## 2 Materials and Methods
### Stage 2: Analysis of the Key Process, Encapsulation
Additionally, the production line is continuous, meaning that once the process starts, products are generated continuously. Therefore, the sampling units are ordered sequentially, in line with the suggestion by [102] for choosing the sample size, as follows: \"some amount of empirical judgement is required\". On the other hand, Refs. [103; 104; 105] suggest the application of monitoring, in which the expert selects a sample of process observations ordered over time as historical data for parameter estimation. Field instrument: An Excel database was designed to capture the input data for the variables for each activity based on Shewart control charts [106]. The data were collected during March and April 2022, when a random sample of data was obtained for each activity of the production process. Determination of the type of distribution to which the data fit: [PERSON] [107], states that goodness-of-fit tests are used to verify that the data obtained from the sample fit a particular known probability distribution. For this purpose, the software Stat:Fit Student Version, 3.1.2.1 (Geer Mountain Software Corp, Pinehurst, NC, USA) was used to determine the type of distribution that the data fit and to determine the specific probability distribution that best fits each operation. The Kolmogorov-Smirnov and Anderson-Darling tests were applied to determine which curve the data fit, and the mean and standard deviation were obtained for each stage of the process in order to obtain sufficient statistical evidence to assert that the data fit some probability distribution, which will be the basis for programming in each of the stages of the simulation model [108]. Model validation: Model validation is a mathematical procedure whose importance lies in ensuring that the data generated by the simulation are statistically similar to those of the real system, thus providing a model capable of emulating the real system and being an effective tool in decision-making. For validation, the paired \(t\)-test was used, with the following null hypothesis:  
**H\({}_{0}\)**: _There is no significant difference between the data from the simulator and those from the real system._  
**H\({}_{1}\)**: _There is a significant difference between the data from the simulator and those from the real system._  
To achieve this, it is assumed that x\({}_{1}\), x\({}_{2}\)...x\({}_{k}\) are observations from a real system, and \(y_{1}\), y\({}_{2}\),...y\({}_{1}\) are data produced by a simulation model. It is necessary to compare the data in data sets to determine if the model is a valid representation of the system. The procedure used to perform this validation was as follows: \(m\) independent sets of data from the system and \(n\) sets of data from the model are collected. Let \(xj\) be the average of the observations in the \(j\)-th set of the system, and let \(yj\) be the average of the observations in the \(j\)-th set of data from the model. The \(xj\)'s are independent and identically distributed (IID) random variables with a mean of \(\mu x=E(xj)\), and the \(yj\)'s are IID random variables (assuming that the \(n\) sets of data were obtained from different replications) with a mean of \(\mu_{y}=E(yj)\). Therefore, the model was compared with the system by constructing a confidence interval for the following:  
\[Z=\mu x-\mu y \tag{2}\]  
Formulas for the paired \(t\)-test, as follows:  
\[Z_{i}=X_{I}-Y_{j} \tag{3}\]The observed difference between \(\mu\), as follows:  
\[\frac{Z_{(n)}=\sum_{i=1}^{n}Z_{i}}{n} \tag{4}\]  
\[\hat{V}\mathrm{ar}[Z(n)]=\frac{\sum_{i=1}^{n}\left[Z_{i}-\overline{Z}_{(n)} \right]^{2}}{n(n-1)}\dots. \tag{5}\]  
The confidence interval is 100 (\(1-\alpha\)), as follows:  
\[\overline{Z}_{(n)}\pm\mathrm{t}_{n-1,1-\alpha/2}\sqrt{\hat{V}\mathrm{ar} \left(\overline{Z}_{(n)}\right)} \tag{6}\]  
Let \(\mathrm{I}(\alpha)\) and \(\mu(\alpha)\) be the lower and upper confidence limits, respectively.