## 2 Methodology
### Continuous Power Consumption Household Appliances
The process begins with the grouping of the data in a number of classes greater or equal to five, in such a way that they cover the whole possible range of values of the variables, and the expected frequency \(Oi\) is calculated for each sample. \[f_{o}(x)=\frac{1}{x\sigma\sqrt{2\pi}}e^{(-\frac{(bx-x)^{2}}{2\sigma^{2}})} \tag{8}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Distribution** & **\(k(n)\)** & \\ \hline General & \(\sqrt{n}+0.12+\frac{0.11}{\sqrt{n}}\) \\ Normal & \(\sqrt{n}-0.01+\frac{0.85}{\sqrt{n}}\) \\ Exponential & \(\sqrt{n}+0.12+\frac{0.11}{\sqrt{n}}\) \\ Weibull & \(\sqrt{n}\) & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: \(k(n)\) according to the distribution function. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**\(c_{\alpha}\)** & & **A** & \\ \hline
**Model** & **0.1** & **0.05** & **0.01** \\ \hline General & 1.224 & 1.358 & 1.628 \\ Normal & 0.819 & 0.895 & 1.035 \\ Exponential & 0.990 & 1.094 & 1.308 \\ Weibull \(n=10\) & 0.760 & 0.819 & 0.944 \\ Weibull \(n=20\) & 0.779 & 0.843 & 0.973 \\ Weibull \(n=50\) & 0.790 & 0.856 & 0.988 \\ Weibull \(n\ \rightarrow\ \infty\) & 0.803 & 0.874 & 1.007 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: C\(\alpha\) values according to the model and the significance. Subsequently, the probability density function of the corresponding model is calculated. The Lognormal distribution is defined by Equation (8), while the Loglogistic distribution is as Equation (9), where \(\mu l\) is the location factor and \(s\) is the scale factor. \[f_{o}(x)=\frac{e^{\frac{-(x-\mu l)}{s}}}{s\Big{(}1+e^{\frac{-(x-\mu l)}{s}} \Big{)}^{2}} \tag{9}\]  
The Loglogistic, Gamma, Generalized Pareto and Rayleigh distributions are shown in Equations (10)-(13), respectively, where \(\lambda_{a}\) and \(\alpha_{d}\) are the skewness and distribution shape factors, respectively. The probability density function of Loglogistic distribution is calculated by Equation (10):  
\[f_{o}(x)=\frac{(xe^{-\mu l})^{\frac{1}{s}-1}}{se^{\mu l}\bigg{(}1+\big{(}xe^{- \mu l}\big{)}^{\frac{1}{s}}\bigg{)}^{2}} \tag{10}\]  
Gamma distribution is defined by Equation (11):  
\[f_{o}(x)=\frac{\lambda_{a}(\lambda_{a}x)^{\alpha_{d}-1}e^{-\lambda_{a}x}}{ \Gamma(\alpha_{d})} \tag{11}\]  
Generalized Pareto distribution is expressed by Equation (12):  
\[f_{o}(x)=\frac{1}{s}\bigg{(}1+\alpha_{d}\frac{x-\mu l}{s}\bigg{)}^{-(\frac{1} {\alpha_{d}}+1)} \tag{12}\]  
Finally, Equation (13) defines the Rayleigh distributions:  
\[f_{o}(x)=\frac{x}{s^{2}}e^{-\frac{2}{\Sigma^{2}}} \tag{13}\]  
If any period corresponding to a series of values cannot be represented by any of the distributions assessed, it will be associated with the distribution corresponding to the nearest period, because the probability of being the same is quite high. Once all the series values have an associated distribution, the expected frequency is calculated with the amount of data, defined in Equation (14). \[E_{i}=nf_{o}(x_{i}) \tag{14}\]  
Finally, \(X^{2}\), defined in Equation (15), is calculated and compared with \(X^{2}\alpha\)(k-r-1), where k is the number of classes and r is the number of parameters on which each distribution depends. If \(X^{2}\) is less than or equal to \(X^{2}\alpha\)(k-r-1) the null hypothesis H\({}_{0}\) of the corresponding distribution to be evaluated is accepted. \[X^{2}=\sum_{i=1}^{k}\frac{\left(O_{i}-E_{i}\right)^{2}}{E_{i}} \tag{15}\]  
Figure 1 shows a flowchart of the sequence of evaluations carried out before the following process. Once all the curves have their associated distribution, a set of 300 random values are generated for each 10-min period according to their associated distribution, and the averages of these are compared with the averages of the real values to verify whether each simulation is close to reality (Figure 2). The percentage of error in each case is calculated by Equation (16):  
\[Error=\frac{\sum\left|\overline{Simulation-\overline{Real}}\right|}{\sum\overline{ Real}} \tag{16}\]