## 2 Methodology
### Statistical Method
If \(R\) gets close to \(\pm 1\), the correlation will be stronger The correlation does not depend on the direction or the sign: A correlation of 0.57 is equal to a \(-0.57\) one. It can be also stated that the greater the absolute value of \(R\), the greater the correlation will be. The determination coefficient \(R^{2}\) is defined as the percentage of the variation of the dependent variable values that can be explained as variations of the independent variable. In other words, a determination coefficient \(R^{2}\) = 0.23 symbolizes that 23% of the dependent variables is attached to the changes of the independent variable. Therefore, if a correlation factor of \(R\) = 0.20 was found between two variables, the determination coefficient would be \(R^{2}\) = 0.04 so that only 4% of the dependent variable is affected by the variations of the independent variable [40]. In order to create a statistical representative model of the generated power by solar energy, the concept of gradient descent optimization (GDO) was considered due its ability to minimize the model error by the LSR of a linear regression model, which is often used on estimation studies, but it is not as complex to implement as an intelligent technique [29; 41; 42]. This optimization method has multiple applications. In Reference [43], this method was used to optimize the geometry of the strut-and-tie truss to minimize the difference in the share of resisting actions with respect to the prediction of the multi-action shear model. In Reference [44], a model based on gradient descent is proposed that integrates several important parameters for ranking channels in order to select the best communication channel from a radio spectrum for transmission, enhanced by cognitive radio as an intelligent wireless solution. The GDO is based on the linear regression method known as the relation among all the input variables and the output one. Depending on the number of input variables, the regression can be simple or multiple [45; 46; 47]. To organize all the gathered data, every input variable is considered as a column in a matrix called \"\(X\)\" and the output parameter is considered as a vector \"\(y\)\", as seen in Equation (3). \[X=\left[ \begin{array}{ccccc}x_{11}&x_{12}&x_{13}&\cdots&x_{1k}\\ x_{21}&x_{22}&x_{23}&\cdots&x_{2k}\\ x_{31}&x_{32}&x_{33}&\cdots&x_{3k}\\ \vdots&\vdots&\vdots&&\vdots\\ x_{n1}&x_{n2}&x_{n3}&\cdots&x_{nk}\end{array} \right]\quad y=\left[ \begin{array} []{c}y_{1}\\ y_{2}\\ \vdots\\ y_{n}\end{array} \right] \tag{3}\]  
The purpose of GDO is to find an estimation of the real output through an equation involving all the collected data as shown in Equation (4). \[h_{\theta}\left(x\right)=\theta_{0}+\theta_{1}x_{1}+\theta_{2}x_{2}+\ldots+ \theta_{k}x_{k}+\varepsilon \tag{4}\]  
where \(h_{\theta}\left(x\right)\) is the estimated output, \(x_{k}\) is the \(k\)th input variable, \(\theta_{k}\) is the characteristic coefficient of every variable, and \(\varepsilon\) is the error between the model and the real data [48]. As can be seen from Equation (4), \(\theta_{0}\) is not a value of influence for any input; however, it does locate the resulting estimation graphic on the Y-axis. If \(\theta_{0}\) is greater than expected, the plot will have a wide gap against the real data in the lower values; nonetheless, if \(\theta_{0}\) is smaller than necessary, the gap between the real and estimated model will be large on the upper zone. Therefore, both cases have a greater error. In order to achieve the minimum error value and instead of a linear regression which uses the least squares method, the GDO finds the right \(\theta_{0}\) by recursive partial derivatives of the cost function described by Equation (5)  
\[J\left[\theta\right]=\frac{1}{2m}\sum_{i=1}^{m}\left(h_{\theta}\left(x^{(i)} \right)-y^{(i)}\right)^{2} \tag{5}\]where \(m\) is the total amount of rows in the matrix, \(x\left(i\right)\) represents the \(i\)th row of \"\(X\)\", and \(y\left(i\right)\) is the value of the \(i\)th row of \"\(y\)\".