Metodoloski zvezki, Vol. 11, No. 1, 2014, 65-78 A Comparison of Methods for the Estimation of Weibull Distribution Parameters Felix Noyanim Nwobi1 and Chukwudi Anderson Ugomma2 Abstract In this paper we study the different methods for estimation of the parameters of the Weibull distribution. These methods are compared in terms of their fits using the mean square error (MSE) and the Kolmogorov-Smirnov (KS) criteria to select the best method. Goodness-of-fit tests show that the Weibull distribution is a good fit to the squared returns series of weekly stock prices of Cornerstone Insurance PLC. Results show that the mean rank (MR) is the best method among the methods in the graphical and analytical procedures. Numerical simulation studies carried out show that the maximum likelihood estimation method (MLE) significantly outperformed other methods. 1 Introduction The Weibull Distribution has been widely studied since its introduction in 1951 by Professor Wallodi Weibull (Weibull, 1951). These studies range from parameter estimation; see for example, Mann et al. (1974), Johnson et al. (1994) and Al-Fawzan (2000) to diverse applications in reliability engineering especially in Tang (2004) and lifetime analysis in Lawless (1982, 2003). The popularity of the distribution is attributable to the fact that it provides a useful description for many different kinds of data, especially in emerging areas such as wind speed and finance (stock prices and actuarial data) in addition to its traditional engineering applications. 1 Department of Statistics, Imo State University, Owerri 460222, Nigeria. Email: fnnwobi@imsu.edu.ng (corresponding author). 2 Department of Statistics, Imo State University, Owerri 460222, Nigeria. Email: ugochukwu4 all@y ahoo. com 66 Felix Noyanim Nwobi and Chukwudi Anderson Ugomma Engineers and statisticians relied mainly on probability plots, referred to as graphical procedure, to analyze life data prior to the advent of desktop computers and reliability analysis software became available. We discuss the three methods; the mean rank (MR), the median rank (MDR) and the symmetric cumulative distribution function (SCDF) in Section 2. Also in Section 2 we review three methods in the objective analytical procedure; the maximum likelihood estimation (MLE), the method of moments (MOM) and the least squares method (LSM). These methods are compared in Section 3, using the mean square error (MSE) and the maximum likelihood (LLH) criteria. 2 Methods for parameter estimation Let S1,S2,"',SN be a random sample of size N from a population. Define r = ln (sJst-1), r G(-¥, ¥ as returns of the stock prices (say), {s : St > 0} . Let xt = rt2 G R+ be hereinafter referred to as the squared returns. 2.1 The Weibull distribution The general form of a three-parameter Weibull probability density function (pdf) is given by f^x)=bixar) exp{"(xauf}, xu-0ab>0 (2.1) where; xt is the data vector at time t; b is the shape parameter; ais the scale parameter that indicates the spread of the distribution of sampled data and u is the location parameter. The Weibull probability density function satisfies the following properties: a) If 0 < b< 1, f is decreasing with f(x) ® ¥ as x® 0+. b) If b = 1, f is decreasing with f(x) ® 1 as x® 0+. c) If b>1, fat first increases and then decreases, with a maximum value at the mode x =a(1 -1/b)1 b. d) For all b> 0, f (x) ® 0 as x®¥. The cumulative distribution function (cdf) of the Weibull distribution is mathematically given as: F (x ) = 1- exp J'-i iau). (2.2) Methods for Estimation of Weibull Distribution Parameters 67 In case of u = 0, the pdf in (2.1) reduces to (2.3) f (* ) = with a corresponding cdf as a A a \P-i exp< x. a F (* ) = x 1 - exp -1-1 a, *> 0;a,b> 0 otherwise x > 0 (2.3) (2.4) 0, otherwise Cheng and Chen (1988) observed that the distribution interpolates between the exponential distribution (b = 1) and Raleigh distribution (b = 2). The mean and variance of the Weibull distribution are E (X) = aT(1 +1/ b) and V(X) = a2 [r(1 + 2/b)-G2 (1 +1/b)] respectively, where T(n) is a gamma function evaluated at n. b 0 b 2.2 Estimation procedures 2.2.1 Graphical procedure If both sides of the cdf in (2.4) are transformed by ln(1 / (1 - x)), we get ln 1 ^ '*.Y 1 - F (*;) a so that ln ln = bln -blna. 1 - F (Xi) Here, x.i actually represents the order statistics x(1) < x(2) <... < x(n). If we let Y = ln (2.5) ln(1/(1 -F(x;.))) , X = lnand c = -blna, then (2.5) represents a simple linear regression function corresponding to Y =bX + c. The unbiased estimate of a, the scale parameter, is calculated as a = exp v bj. (2.6) (2.7) 1 68 Felix Noyanim Nwobi and Chukwudi Anderson Ugomma where c is the intercept of the linear regression (2.6). Thus, we perform the estimation of a and ¡5 using the following methods of estimation in Table 1. Table 1: Methods of estimation by graphical procedure Method F (X) Mean Rank i/ (n +1) Median Rank (i - 0.3)/( n + 0.4) Symmetric CDF (i- 0.5)1 n We plot Yi, which is a function of F(xt), versus Xi(= ln(xi)), using the following procedure: a) Rank the data {xt} in ascending order of magnitude; b) Estimate F (x) of the i th rank order; and c) Plot Yversus Xt. This plot produces a straight line from which we obtain ¡5 and a (see (2.6) and (2.7)). 2.2.2 Analytical procedure Maximum Likelihood Estimation (MLE) The method of maximum likelihood estimation is a commonly used procedure for estimating parameters, see, e.g., Cohen (1965) and Harter and Moore (1965). Let x1, x2,..., xn be a random sample of size n drawn from a population with probability density function f (x,1) where 1 = (¡,a) is an unknown vector of parameters, so that the likelihood function is defined by L = f (a,¡) = n f (X,1) (2.8) i=1 The maximum likelihood of 1 = (b,a), maximizes L or equivalently, the logarithm of L when — = 0, (2.9) dl V 7 Methods for Estimation of Weibull Distribution Parameters 69 see, for example, Mood et al (1974). Consider the Weibull pdf given in equation (2.3), its likelihood function is given as: l < «-..■ * ;A«)=n (a f 'exp a Wii ^ n . a Jl a , Y (a, Z exp t=1 Taking the natural logarithm of both sides yields ln L = n ln fb] + (b1) ¿X - ln (ab-1)-± (2.10) xt (2.11) t=1 t=1 v a y and differentiating (2.11) partially w.r.t j3 and a in turn and equating to zero, we obtain the estimating equations as follows n — ln L = — + Y ln x —1 i xf ln x = 0 dß ß t=1 f a 1=1 t f and d n 1 ^ ¿ln L = Y ¿ß= 0. da a a' t=1 From (2.13) we obtain an estimator of a as 1 a mle =z Y xß n t= and on substitution of (2.14) in (2.12) we obtain 1 +1 £ ln x -= 0 ß nt=1 t Y ;=! xß (2.12) (2.13) (2.14) (2.15) which may be solved to obtain the estimate of b using Newton-Raphson method or any other numerical procedure because (2.15) does not have a closed form solution. When ftmle is obtained, the value of a follows from (2.14). Method of Moments (MOM) The second procedure we consider here is the MOM which is also commonly used in parameter estimation. Let x1,x2,...,xn represent a set of data for which we seek an unbiased estimator for the kth moment. Such an estimator is generally given by ß ß 70 Felix Noyanim Nwobi and Chukwudi Anderson Ugomma m,. =11 xk nT7 (2.16) where mk is the estimate of kth moment. For the Weibull distribution given in (2.3), the kth moment is given by mk ^ I ^ 1 + — . b (2.17) where r is as defined in subsection 2.1. From (2.17), we can find the 1st and 2 moments about zero as follows nd m =m f 1 +1 . b \ (2.18) and in1 = fi2 +(J2 = 1V a. r 1+— . b -r 1+— . b (2.19) When we divide the square of rhlby m2, we get an expression which is a function of only b, r 1+ __V 1 b r 1+ 1 b a2 + a2 (2.20) r 1 + b 1 n 2 where // = E(Xt)=-^xf, a2 = E(Xf)-(E(Xt)) and letting Z = 1/b (2.19) is n t= easily transformed in order to estimate b so that the scale parameter amom can be estimated with the following relation ^^mom = /V G 1 +1 . b (2.21) The Least Squares Method (LSM) The Least Squares method is commonly applied in engineering and mathematics problems that are often not thought of as an estimation problem. We assume that there is a linear relationship between two variables. Assume a dataset that constitute a pair (xt, yt) =( x1, y1), (x2, y2),..., (xn, yn) were obtained and plotted. The least squares principle minimizes the vertical distance between the data points 2 2 2 Methods for Estimation of Weibull Distribution Parameters 71 and the straight line fitted to the data, the best fitting line to this data is the straight line: yt = a+fixt such that Q (a; a, b) = X (yt-a-bxt )2 t=1 To obtain the estimators of a and b we differentiate Q w.r.t a and b. Equating to zero subsequently yields the following system of equations: |2 ^ (y-ab )2 t=1 and ff = -2±(yt -a-bxt)2xf = 0 db t=1 Expanding and solving equations (2.21) and (2.22) simultaneously, we have nZ xy - Z xZ y b= nZ x2-(Z x )2 and c = y- b x ; a = exp i c ^ b. v h y where a and b are the unbiased estimators of a and b respectively. (2.22) (2.23) (2.24) (2.25) 3 Method assessment and selection 3.1 Comparison of estimation methods The Mean Squared Error (MSE) criterion is given by 1 -A r - n2 MSE = - XI" F (x)-F ( a; )] (3.1) n i=1 L J where F() is obtained by substituting the estimates of a and b (for each method) in (2.4) while F(xt) = i/n is the empirical distribution function. The method with the minimum mean squared error (MSEmin ) becomes the best method for the estimation of Weibull parameters among the candidate methods. 72 Felix Noyanim Nwobi and Chukwudi Anderson Ugomma 3.2 Goodness-of-fit tests Goodness-of-fit test procedures are intended to detect the existence of a significant difference between the observed (empirical) frequency of occurrence of an item and the theoretical (hypothesized) pattern of occurrence of that item. Here, we assume that the Weibull distribution is a good fit to the given dataset; otherwise, this assumption is nullified if, for this test, the computed statistic is greater or equal to a defined critical value. Kolmogorov-Smirnov test The Kolmogorov-Smirnov test is used to decide if a sample comes from a population with specific distribution. It is based upon a comparison between the empirical distribution function (ECDF) and the theoretical one defined as F(x) = | f (y,6)dy where f (x,6) is the pdf of the Weibull distribution. Given n ordered data points Xj, X2,..., Xn, the ECDF is defined as F(X1 ) = N(i)/n where N(i) is the number of points less the Xt ( Xt are ordered from smallest to highest value). The test statistic used is Dn = Sup F(x)-F(x) . (3.2) 1