Fitting Wind Speed to a Two Parameter Distribution Model Using Maximum Likelihood Estimation Method

Kenya is among the countries that are continuously investing in wind energy to meet her electricity demand. Kenya is working towards its vision 2030 of achieving a total of 2GW of energy from wind industry. To achieve this, there is a need that all the relevant data on wind characteristics must be available. The purpose of this study is, therefore, to find the most efficient two-parameter model for fitting wind speed distribution for Narok County in Kenya, using the maximum likelihood method. Hourly wind speed data collected for a period of three years (2016 to 2018) from five sites within Narok County was used. Each of the distribution’s parameters was estimated and then a suitability test of the parameters was conducted using the goodness of fit test statistics, Kolmogorov-Smirnov, and Anderson-Darling. An efficiency test was determined using the Akaike’s Information Criterion (AIC) and the Bayesian Information Criterion (BIC) values, with the best decision taken based on the distribution having a smaller value of AIC and BIC. The results showed that the best distributions were the gamma distribution with the shape parameter of 2.47634 and scale parameter of 1.25991, implying that gamma distribution was the best distribution for modeling Narok County wind speed data.


Introduction
Wind speed distribution characteristics refer to the wind speed parameters like the mean, variance, standard deviation, and covariance. These parameters vary from place to place depending on various factors like the length of data observed, the site of the experiment, and the time of observing the wind speed data among others. Therefore, there is a need to study the variations of these parameters for any given specific geographical site before installing the wind plant. This is only possible if there is an approved statistical distribution that has been examined and recommended for the site or region of interest. Many types of research have come out to model wind speed using different statistical distributions like log-normal distribution, Weibull distribution, gamma distribution, Rayleigh distribution, and Erlang distribution among others in most parts of the world with a good quantity of wind but not showing great interest in Kenya even if Kenya is stated as one of the countries in Africa with the best wind [4,16].
In Kenya, Narok is one of the regions with plenty of wind making it one of the places with the potential of generating more wind energy [16]. To achieve this, the investors and the wind industry needs to understand the wind speed characteristics of this region. This is because the wind speed is the most significant factor in the installation process of any wind plant. Hence there is a need to have complete information about wind speed characteristics. This can only be possible by having a recommended statistical distribution for examining the wind speed data. There are existing statistical distributions for studying wind speed data for a different specific region but the problem is that among the existing wind speed distributions there is no underlying distribution for examining Narok county wind speed characteristics. Therefore, leaving the wind industry and other investors with incomplete knowledge on the suitable distribution for examining Narok region wind data leading less interest since they are lacking a control tool for their study. Therefore, this research fills this gap by analyzing the hourly wind speed data of Narok county using the maximum likelihood by fitting the two-parameter statistical distributions of Weibull, log-normal and gamma, to enables us to choose the suitable distribution among the three that fits the data perfectly and efficiently to help for studying wind speed characteristics of Narok county.
The two-parameter distributions used are represented as follows.

Weibull Distribution
A study carried by [1,2,6,17] on the Weibull distribution to analyze wind speed concluded that the Weibull distribution function is the best in estimating the parameters of wind speed. The Weibull distribution model applied by the study is given by; Where: f(u) is the probability of observing wind speed. u is the wind speed. b is the shape factor (parameter) which has no unit but range from 1.5 to 3.0 for most wind conditions p is the value in the unit of wind speed called the Weibull scale parameter in m/s.

Lognormal Distribution
In studies by [3,13,18] they did wind speed analysis and one of the statistical distributions they used in examining the wind data was the log-normal statistical model with parameters v and k. The log-normal density function with the two parameters is given by: Where: p is the log-normal random variable ln(p) is the normal random variable v is the mean for a normal random variable k is the standard deviation for the normal random variable

Gamma Distribution
The probability density function of gamma random variable y in combination with two parameters z and q representing the shape and scale parameters respectively is given by [10,12,19].  ( , , ) , , , , 0 Where: z is the shape parameter q is the scale parameter y are the random variables (wind speed)

Maximum Likelihood Estimation Method (MLE)
According to [21], the maximum likelihood estimation method can be applied in many problems since it has a strong intuitive appeal and it yields a reasonable estimator. He also stated that the maximum likelihood estimation method is widely used because it is more precise especially when dealing with large samples since it yields an excellent estimator when the sample is large. According to [9,15] it is stated that a maximum likelihood function let us say of M is a solution to the maximization problem given as.
Where X1,...., XN represents the wind speed observations. Under suitable regularity conditions, the first-order condition is given as These conditions are generally called the likelihood or loglikelihood equations. The first derivative or gradient of a condition (log-likelihood) solved at the point satisfies the following equation The log-likelihood equation that corresponds to a linear or non-linear system of P equations with P unknown parameters M1,... MP is given by Maximum likelihood estimation is a recommended technique for many distributions because it uses the values of the distribution's parameters that make the data more likely Likelihood Estimation Method than any other parameter. This is achieved by maximizing the likelihood function of the parameters given the data. some good features of maximum likelihood estimators are that they are asymptotically unbiased since the bias tends to zero as the sample size increases and also, they are asymptotically efficient since they achieve the Cramer-Rao lower bound as sample size approaches ∞ and lastly they are asymptotically normal.

Maximum Likelihood Estimation for Weibull Distribution
For the two-parameter distributions, the shape parameter is dimensionless and shows how peak the site under examination is and the scale parameter is to show how windy the site under examination is. This research used the Weibull two-parameter distribution for the wind speed analysis which is given in equation (1), [1,11].
According to [7], the two constants, shape and scale parameters are positive, the scale parameter scales u variable (wind speed variable) and the shape parameter decides the shape of the rate function, ( ) = . If the shape parameter b, is less than 1, then the rate is decreasing with u. Whereas if the shape parameter is greater than 1, then the rate is increasing with u and if the shape parameter = 1, then the rate is said to be constant, and in this case, the Weibull distribution is said to be the exponential distribution. Suppose that , , … . . , ! are independent and identically distributed Weibull random variables representing the wind speed with a probability density function f(u) given in the equation (1) where the two parameters are assumed to be unknown. To estimate the parameters using the maximum likelihood method, the likelihood function of , , … . . , ! can be formulated from equation (1) as By taking the natural logarithm transformation, we have the equation Differentiating ln L (p, b) with respect to p, we obtain ( ) Differentiating ln L (p, b) with respect to b, we obtain Equating equations (10) and (11) to zero gives the maximum likelihood estimates "#, % & ' of (p, b). The estimate for #̂ is as shown ( ) The estimate for % & is obtained as shown below Equations (3.10) and (3.11) can be solved simultaneously for % & which also obtains #̂ subsequently.

Maximum Likelihood Estimation for Lognormal Distribution
According to [5], the density function for the two-parameter lognormal distribution is given as in equation (2), [2,13].
To compute the maximum likelihood, we obtain the likelihood function first for equation (2). The likelihood function of lognormal distribution for a series of # () (* = 1, 2, … . , ) is derived by taking the product of the probability density of the individual # () given as below.
We then derive the likelihood function by taking the natural logarithm

Maximum Likelihood Estimation for Gamma Distribution
In this section, we considered also a gamma distribution with shape parameter and scale parameter since it is the distribution that is widely used in real-life data sets. The probability density function of gamma random variable y in combination with two parameters z and q representing the shape and scale parameters respectively is given in equation (3), [10,19].
For maximum likelihood estimation, we first get the likelihood function which is given by [14] ( ) ( ) ( ) The log of the likelihood function is given by To find the maximum likelihood estimates for 1̂ and / 2 for z and q, we equate equation (19) to zero and then find out the partial derivatives with respect to 1̂ and / , respectively.

Goodness of Fit Test
After analyzing the data using the three statistical distribution, it is important to verify the suitability and the accuracy of the distribution by performing the goodness of fit test which simply tells you how good the distributions fit the data. Several tests will be used to analyze the suitability of the three distribution namely gamma, Weibull, and lognormal distribution to help have the most precise and reliable distribution. The goodness of fit test was examined using the following metrics namely the Kolmogorov-Smirnov test and Anderson-Darling test. And the goodness test criteria will be examined using Akaike's Information Criterion and Bayesian Information Criterion. Kolmogorov-Smirnov test This is a two-sample test with the advantage that it does not depend mostly on the underlying cumulative distribution function being tested and also applies only to continuous distributions which in this case vis applicable since we are only investigating the continuous statistical distributions. It is calculated as, Where: 3 (4) is the proportion of t1 values less than or equal to t 3 (4) is the proportion of t2 values less than or equal to t 5 6 : The data follows a specified distribution 5 : The data do not follow the specified distribution The smaller the test statistic the better the fit.

Akaike's Information Criterion (AIC)
The Akaike's Information Criterion is calculated as Where log L(P) defines the value of the maximized loglikelihood objective function for a model with w parameters. A smaller AIC value represents a better fit.

Bayesian Information Criterion (BIC)
The Bayesian Information Criterion is calculated as Where log L(P) represents the values of the maximized log-likelihood objective function for a model with w parameters fit M data points. A smaller Bayesian Information Criterion value indicates a better fit (best model for fitting the data)

Efficiency Test
An estimator is said to be more efficient than another estimator if it is more reliable and precise for the same sample size. For the research to achieve part of its specific objectives, there is a need to understand how efficiency test is carried out. This will be done using the comparison between the Akaike's Information Criterion and the Bayesian Information Criterion for the two distributions whereby the distribution with the smallest Akaike's and Bayesian Information Criterion values will be picked as the best.

Descriptive Analysis for Two-parameter Distribution
The minimum speed in the data is 0.12 m/s and the maximum speed is 5.35 m/s with the mean speed of 1.9658 m/s and the estimated standard deviation of 1.2407 m/s. The estimated kurtosis and skewness are 2.8094 and 0.8433. Figure 1 shows the data distribution for 63778 observations free from outliers.  Table 1 shows the summary statistics.  From Figure 2, it can be observed that the distribution of the data is positively skewed since the peak of the data is towards the left and the right tail is longer. This shows that the data is not perfectly symmetrical since the skewness is not equal to or close to zero. From the cumulative distribution, it can be seen that the probability of having a wind speed of less than 4 m/s is almost 0.8. Meaning that the observed wind speeds above 4 m/s are less compared to those below 4 m/s.  Figure 3, is used to show a skater plot of kurtosis and skewness. This graph helps in understanding the best possible distribution or distributions that are or are fitting the data. From the graph, we can observe that the plot is can be estimated at around a kurtosis of 2.8 and a square of skewness of around 0.7 (skewness = 0.8). With a skewness of 0.8 and kurtosis of 2.8, we can conclude that the normal distribution cannot fit the data best since normal distribution requires that kurtosis = 3 and skewness = 0. The uniform distribution is not also the best distribution for fitting this data since the observed difference between the scatter plot of kurtosis and square of skewness and that of the uniform distribution is not that close (for a uniform distribution needs a kurtosis value of 1.8 and skewness value of 0). For the logistic distribution, we can say that it is also not the best for the data since logistic distribution always has a kurtosis of 4.2 and skewness value = 0 and from the graph, it can be observed that the logistic plot is not closer to the data plot. For the exponential distribution, we can observe that its point is far away from the data point, this is because exponential distribution is expected to have a kurtosis of 9 and skewness of 2 compared to the data point skewness of 0.7 therefore exponential distribution is not the best for the data. From the graph, it can be seen that beta distribution can fit the data but this distribution cannot be applied to the data since beta distribution is a family of continuous probability distributions defined on the interval of [20,1] which is not the case with the collected data for this research. From the graph, log-normal and gamma distributions can fit the data best because they appear to be close to the data points and well distributed. Weibull distribution is also another good distribution for fitting the data since from the graph it is said that Weibull is close to gamma and log-normal. Table 2 shows each distribution with its estimated parameters, standard error of the parameters, and their correlations coefficients. From table 2, we can see that Weibull's two parameters namely shape and scale parameters have a weak positive correlation. Gamma parameters are also positively correlated with a strong positive correlation of 0.9. The log-normal two parameters show a weak negative correlation. It is very important to examine if the estimated values of the parameters are useful in predicting wind speed. This can be done by investigating the significance of each of the parameters under each distribution. This is achievable by applying the t-test with the test statistic given as The appropriate hypothesis test about the adequacy is given as 5 6 : Estimator = 0 versus 5 : Estimator ≠ 0. We reject 5 6 if the t statistic value is greater than t (table) value. In this case, we use 1.96 as the t table value since our sample size is above 1000 and we assume that the parameter value = 0. To get the best distribution among the three, we can use either graphical analysis or goodness of fit analysis

Test of Goodness of Fit
The discussion here will help us to the best distribution that can be applied to study the wind speed data of Narok county. The conclusion will depend on the values of Akaike's Information Criterion (AIC) and Bayesian Information Criterion (BIC). The model with the smaller value for both the AIC and BIC is considered the best distribution for the study.  Table 4 shows that one or more distribution (s) can be used to fit the Narok region wind speed data since the data follows all the three distributions. This is evidenced from the first three statistics namely Kolmogorov-Smirnov, Cramer-von Mises, and Anderson-Darling test. This is because these three statistics are used to investigate if the applied data follows a certain specified distribution. Since the two statistics, Anderson-Darling and Cramer-von Mises are the refinements of the Kolmogorov-Smirnov (K-S) test, we can use either of them to make a decision. Therefore, using the Kolmogorov-Smirnov statistic it can be concluded that the data follow gamma distribution and log-normal distribution since the critical values for Kolmogorov-Smirnov is 0.0430. Because gamma and lognormal has the smaller KS statistic values of 0.036181 and 0.038854 compared to the KS critical value, we fail to reject the null hypothesis of the other two distributions.

Conclusion
From the analysis, we can conclude that using maximum likelihood estimation method, gamma distribution with two parameters is the best distribution for fitting wind speed data since it yields lower AIC and BIC values. The scale parameter which shows how windy the site under study is, is estimated by the value 1.25991 and the shape parameter how peak the site is, is estimated by the value 2.47634. Therefore, the gamma distribution is the efficient distribution for studying how windy and/or peaked the region or site under examination is. The distribution is given as:

Recommendation
We recommend that for the investors or wind industry interested in studying and/or predicting the Narok wind speed, they should use the gamma distribution since it will give the best wind speed probabilities compared to the other form of distributions. We also recommend to researchers, investors, and wind industries to apply the gamma distribution in the examination of wind speed distribution in the other regions/parts of the country with good wind quantity like Loitoktok, Marsabit, etc and also in other parts of the world.