主页
A I I E Transactions An Algorithm for Generating Gamma Variates Based on the Weibull Distribution
An Algorithm for Generating Gamma Variates Based on the Weibull Distribution
Ramberg, John S., Tadikamalla, Pandu R.你有多喜欢这本书？
下载文件的质量如何？
下载该书，以评价其质量
下载文件的质量如何？
卷:
6
语言:
english
日志:
A I I E Transactions
DOI:
10.1080/05695557408974961
Date:
September, 1974
文件:
PDF, 283 KB
你的标签:
在15分钟内，文件将被发送到您的电子邮件。
在15分钟内，文件将被送到您的kindle上。
注意事项: 您需要验证你发送到Kindle的每本书。检查你的收件箱，查看来自Amazon Kindle Support的确认邮件。
注意事项: 您需要验证你发送到Kindle的每本书。检查你的收件箱，查看来自Amazon Kindle Support的确认邮件。
关联书单
0 comments
您可以留下评论，分享你的经验。其他读者也会有兴趣了解您对您所读书籍的看法。不管你喜不喜欢这本书，只要您如实、详细地告诉他们，大家就能找到感兴趣的新书。
1
2


This article was downloaded by: [McGill University Library] On: 14 October 2014, At: 08:45 Publisher: Taylor & Francis Informa Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House, 3741 Mortimer Street, London W1T 3JH, UK A I I E Transactions Publication details, including instructions for authors and subscription information: http://www.tandfonline.com/loi/uiie19 An Algorithm for Generating Gamma Variates Based on the Weibull Distribution a John S. Ramberg & Pandu R. Tadikamalla a a The University of Iowa , Iowa City, Iowa, 52242 Published online: 09 Jul 2007. To cite this article: John S. Ramberg & Pandu R. Tadikamalla (1974) An Algorithm for Generating Gamma Variates Based on the Weibull Distribution, A I I E Transactions, 6:3, 257260, DOI: 10.1080/05695557408974961 To link to this article: http://dx.doi.org/10.1080/05695557408974961 PLEASE SCROLL DOWN FOR ARTICLE Taylor & Francis makes every effort to ensure the accuracy of all the information (the “Content”) contained in the publications on our platform. However, Taylor & Francis, our agents, and our licensors make no representations or warranties whatsoever as to the accuracy, completeness, or suitability for any purpose of the Content. Any opinions and views expressed in this publication are the opinions and views of the authors, and are not the views of or endorsed by Taylor & Francis. The accuracy of the Content should not be relied upon and should be independently verified with primary sources of information. Taylor and Francis shall not be liable for any losses, actions, claims, proceedings, demands, costs, expenses, damages, and other liabilities whatsoever or howsoever caused arising directly or indirectly in connection with, in relation to or arising out of the use of the Content. This article may be used for research, teaching, and private study purposes. Any substantial or systematic reproduction, redistribution, reselling, loan, sublicensing, systematic supply, o; r distribution in any form to anyone is expressly forbidden. Terms & Conditions of access and use can be found at http:// www.tandfonline.com/page/termsandconditions TECHNICAL NOTE An Algorithm for Generating Gamma Variates Based on the Weibull Distribution* JOHN S. RAMBERG SENIORMEMBER,AIIE The University of Iowa Iowa City, Iowa 52242 Downloaded by [McGill University Library] at 08:45 14 October 2014 PANDU R. TADIKAMALLA STUDENT MEMBER, AIIE The University of Iowa Iowa City, Iowa 52242 Abstract: An algorithm for generating gamma variates based on the Weibull distribution is given. This algorithm, a modification of one given by Phillips, is shown to be more accurate than the latter. The speed and memory requirements are similar. Liittschwager ( 3 ) discussed the similarity between three families of distributions, the gamma, the lognormal and the Weibull, and concluded that under certain conditions the gamma and the Weibull distributions cannot be distinguished. Based on this conclusion, Phillips ( 4 ) gave an approximate algorithm for generating gamma variates. He determined the coefficients of the twoparameter Weibull distribution so as to match the mean and variance of the twoparameter gamma distribution being approximated. For further discussion of previous results and applications, see Phillips (4). In this paper we use a threeparameter Weibull distribution to obtain an algorithm which is similar to the one given by Phillips (4), but more accurate. F ( X ) = 1  exp E ( n = bkI'(l + k l c ) . x a , PI PI From this result, the mean (p), the variance ( 0 2 ) and the standardized third moment ( a 3 )of X can be obtained: p = E(X)=a+br(l +l/c) The Weibull distribution has been given in a variety of forms by different authors. The density and distribution function of the threeparameter Weibull distribution, as given in Johnson and Kotz (2), are: = b c ] where x > a, b > 0, c > 0. The parameters a, b and c are often called the location parameter, the scale parameter, and the shape parameter, respectively. The kth moment of y = x  a is given as The Weibull Distribution f.1 [( y) o2 = E(X 11)2 = b2 [ ~ ' (+2/c) l  ~ ' (+l1 1 ~]) ~ a3 = ~ ( ~  ~ ) 3 / ~ 3 [41 [5 1 r ( i + ~ I c )3 r ( i + 2 1 ~~) ' (+i1 1 ~+) 2 r ( 1 + 1 1 ~ ) ~ 161 [ r 3 ( l + 2 / c )  r ( l +I / C2)]3 1 2 C1 e x P [  ( y ) c ] [ l l Received May 1973; revised June 1974. September 1974, AIIE TRANSACTIONS * This work was supported in part by National Science Foundation Grant Number GP30966XX and in part by a research assignment from the Graduate College, University of Iowa. 25 7 Note that the third standardized moment, a measure of skewness, is a function of c only. (This is true for all standardized moments.) The variance is a function of b and c and the mean is a function of a, b and c. Weibull variates can be generated, using the "direct method" by setting F(x) = p in [2] and solving for x obtaining, parameter of the gamma distribution, so that a, = af. Given this value of c, b is determined by equating the variances of the two distributions: Finally a is obtained by equating the means: where p is a uniform zeroone random number. Thus if we generate values of x according to [7] with a, The Gamma Distribution Downloaded by [McGill University Library] at 08:45 14 October 2014 The density function of the twoparameter gamma distribution and its raw moments are: b and c as specified above the distribution of x will be approximately gamma. At this stage one might question the possibility of finding a "better" approximation by also considering the fourth standardized moment. We considered the following formulation to determine c: minimize k l [a3  a3(c)l C where x > 0, a > O,P > 0. Note that the distribution function for the gamma family is not given. It does not exist in "closed form" and this is a reason for seeking an approximate method for generating gamma variates. More precisely the reason is that the inverse of the gamma distribution function does not exist in "closed form." In order to distinguish between the moments of the Weibull and the gamma distributions, asterisks are used for the latter. The mean, variance and the third and fourth standardized moments can be derived from [9] as + k2 [a$  a4(c)l2 [I61 where k 1 and k2 are predetermined weights. The subroutine ZXPOWL,' which employs a modified Powell algorithm, was used to solve [16] for the following values of k l and k2: (Note that k l = 1 and k 2 = 0 means that only the third standardized moments are matched. Similarly k l = 0 and k2 = 1 means that the fourth standardized moments are equated without considering the third standardized moments.) On the basis of the percentiles, which are not shown here, we concluded that the first three moments were sufficient for determining the parameters of the approximation. Comparison of the Approximations Note that the standardized moments are functions of a only. Method of Approximation Phillips (4) used stepwise polynomial regression procedures to find a relationship between the parameters of the twoparameter Weibull distribution and those of the gamma distribution so as to match the means and variances of these two distributions. We consider in addition the third standardized moment which is a measure of the shape of a distribution and using similar methods obtain a simpler and more accurate result. We determine the shape parameter c of the Weibull distribution as a function of a , the shape 25 8 Percentiles and moments are often used for the purpose of comparing probability distributions. The algorithm presented in this paper guarantees that the first three moments equal those of the gamma, whereas Phillips (4) algorithm guarantees equality of the first two moments. A comparison of the percentiles of the approximations with those of the gamma is given in Table 1. The value of /3 is fured at 2.0 and the a values are chosen so that the gamma distribution is also a x2 distribution (with 2a degrees of freedom) for which the percentiles are readily available (1). Figure 1 gives the exact density of the gamma distribution, Phillips' approximation and the proposed approximation for some noninteger values of a . Available from International Mathematical and Statistical Libraries, Inc., Suite 510,6200 Hillcroft, Houston, Texas 77036. AIIE TRANSACTIONS,Volume 6, No. 3 GAMMA PROPOSED  GAMMA PROPOSED PHILLIPS * o = 4.6 Downloaded by [McGill University Library] at 08:45 14 October 2014 P 0.00 I 3.Y6 6.93 X LO39 VRLUE 13.86 17.32 = 2 0 e4.E PO.79 e GAMMA PROPOSED 0 PHILLIPS I 0 00 V 85 14 66 9 10 X VRLUE 18 19 22 79 a 7 2 P 2 0 27 29 31 8U 2~ percentile for the proposed algorithm and Phillips' algorithm can be obtained directly from the algorithms by replacing the uniform random number by one minus the appropriate probability 3 ~ h percentiles e for Phillips' algorithm were obtained from another version of the subroutine as given by Phillips and Beightler [5] and corrected on page 93 of the Journal of Statistical Zomputation and Simulation, Vol. 2 , 1973. The algorithm as given in 141 is incorrect and to our knowledge an errata statement has not been given in the AZZE Transactions. It should be noted that it is not necessary to generate samples from these algorithms in order to compare them using "goodness of fit" tests. The gamma density and the densities of the approximations are known exactly and can be compared as such. Generating data for the purpose of comparing these algorithms introduces variability and clouds the issue. GAMMA PROPOSED W PHILLIPS rn P= The Algorithm 12 4 2 0 +m t ~2 g .As.Crn t rn m E2 D a 0 00 6.51 13 02 x VRLUE 19 53 3 03 32 54 39 05 '15 56 Fig. I. Comparison of the Probability Densities of the Gamma and the Approximations September 1974, AIIE TRANSACTIONS A FORTRAN IV function based on this algorithm is given in Fig. 2. The quantity (1  p) in [7] is replaced by p in the algorithm. This eliminates a subtraction operation and can be done because of the fact that p is uniform zeroone which implies that (1  p) is also uniform zeroone. Regression equations are included for determining c as a function of a in a manner simiiar to that of Phiilips (4). The arguments of the function are ALPHA = a, BETA = P and ALPNEW = any positive real number. The fust time the function HYMA is called, the parameters of the approximation (a* and are and the variate is returned. On subsequent calls, for the same a and P, the 259 FUNCTlON HYMA I ALPHA~BETAIALPNEWI Acknowledgment T H I S FUNCTIUY GENERATES GAMMA VARIATES W I T H S P E C l f I E D PARAMETERS ALPHA G BETA ......................................................... PARAMETERS ALPH~ BETA  rnt SHIPE PARA METE^ O F THE REQUIRED GAMMA THE S L b l E PARAMETER OF THE REQUIRED GAMMA  ALPNtU ANY P O S I T I V E REPL NUMBER TO BE I N I T I A I ISEO WHE(4EVER T H t PAPAMETERS OF THE GAMMA D I S T R I B U T I O N CHANGE ......................................................... I I I I * * Downloaded by [McGill University Library] at 08:45 14 October 2014 * * F F F F IALPNEW .LT. 0.0) IALPH4 .LT. 101 IALPH9 .Li. 10.0) IALPHL  6 E  1 0 0 . 0 ) GO GO GO GD TO 6 0 TO 5 TO 1 0 TO 2 0 C = 1.539714 + ALPHA*10.056961 ALPHA*(0.0011387 + ALPHA*I0.000011163 + A l ~ P P A * I  0 ~ 0 C G 0 0 0 0 4 1 0 5 1 1I ) GO l U 3 0 WRITE ( 6 ~ 1 5 ) FORMAT I ' THE 6CCURACV OF THE ALG'IRITHM 4LPHA DECREAbES BELOW 1.0' I OECQEASES AS C = 0.61243 t ALPHA*l0.474874 t ALPHA*(0.09958 aLPHA*l0.01357476 + ALPHA*(0.0009868315 + ALPH4*IV.OOOOZ889724) ))1) GO TO 3 0 NORMAL APPROXIMATION FOR ALPHA > t 100.0 C = 3.25 CONTINUE GAMMA I S (HE We wish to express our appreciation to the referees for their suggestions. We also wish to note that this paper was submitted to the AIIE Transactions prior to the submission of the paper "Simulation of Arbitrary Gamma Distributions," by D. J. Wheeler, which appeared in AIIE Transactions, June 1974, pp. 167169. Because of delays and a disagreement between one of the referees and ourselves, our paper' appears in this later issue. Dr. Wheeler compares the PhillipsBeightler algorithm with one which he developed and called Wheeler's Burr Approximation. The reference to his own work (his (5)) is as yet unpublished. We submitted a similar article to the same journal, J.S.C.S. Professor Krutchkoff, editor of J.S.C.S., has informed us that our manuscript was received prior to Dr. Wheeler's manuscript and has been accepted for publication. In that article we also gave comparisons of these methods of approximation. We also wish to note that Dr. Wheeler's work was done independently of ours. I B M I S S P ) SUPPLIED GAYYA FUNCTION B = 5 4 R I I A L P r l A I lGAFIMA(1+2/C. IGIMMAI 1 + 1 / C ) * * Z I A aLPH4rBtTA e*GAMYAil+I/CJ ALPNEM = 10.0  l*BETA References RANDtOI I S THE UNIFQRI' RANDCV NUMBER GENERATOR P = RANO(O1 HYMA 5 A + b * l  A L O G I P ) I * * l / C RETURN EN0 (1) ALPHA = a BETA = B (2) (3) Fig. 2. The algorithm Abramowitz, M. and Stegun, I. A., Handbook o f Mathematical Functions, AMS55, National Bureau of Standards, 984985 (1964). Johnson, N. L. and Kotz, S., Continuous Univariate DistributionsI. Houghton Mifflin Company, Boston, p. 54 (1970). Liittschwager, J. M., "Results of a Gamma, Lognormal and Weibull Sampling Experiment," Industrial Quality Control, 22 (4) function uses the previously calculated parameters, eliminating the parameter computation. Each time the parameters of the gamma distribution are changed, the ALPNEW must be initialized to a positive number. For a 2 100.0, the function uses a normal approximation for the gamma distribution, with c = 3.25 as suggested by Johnson and Kotz (2). Summary The algorithm given in this paper is shown to be more accurate than the algorithm of Phillips (4). While both algorithms are based on Weibull distributions, the improvement in accuracy results from using a three parameter Weibull distribution. The third standardized moments are equated in addition to the means ahd variances to determine the parameters of the Weibull. Results also indicate that use of the fourth moment does not further improve the approximation. 260 (5) 3, 124127 (September 1%5). Phillips, D. T., "Generation of Random Gamma Variates from the TwoParameter Gamma," AIIE Transactions, 3,,3 19 1 198 (September 1971). Phillips, D. T. and Beightler, C. S., "Procedures for Generating Gamma Variates with NonInteger Parameter Sets," Journal of Statistical Computation and Simulation, 1,3,197208 (1973). Dr. John S. Ramberg is an Associate Professor of Systems Engineering and Statistics, Chairman of Applied Mathematics, University of Iowa. His current research interests are in simulation, random variate generations, discriminant analysis and regression analysis. Dr. Ramberg earned his BEE from the University of Minnesota and MS and PhD in operations research from Cornell University.He has worked for Procter & Gamble and is a member of AIIE, ASA. IMS and ASQC. Mr. Pandu R. Tadikamalla is a PhD candidate at the University of Iowa. His research is in the areas of probability distributions,optimization and random variate generation. He received his BSME from Andhra University, India and MS from the University of Iowa. MI. Tadikamalla is a Student Member of AIIEand ASA. AIIE TRANSACTIONS, Volume 6, No. 3