Algorithm 599: sampling from Gamma and Poisson distributions
暂无分享,去创建一个
A) r e t u r n s a s a m p l e S f r o m t h e s t a n d a r d g a m m a d i s t r i b u t i o n w i t h p r o b a b i l i t y d e n s i t y f u n c t i o n y(x) = xa-ie-X/F(a), w h e r e a-~ A > 0. delivers s a m p l e s T f r o m t h e s t a n d a r d n o r m a l d i s t r i b u t i o n. T h e integer v a r i a b l e I R initially defines t h e s e e d of t h e b a s i c r a n d o m n u m b e r sequence. I R is to be e q u a t e d to s o m e p o s i t i v e i n t e g e r of t h e f o r m 4 x K + 1 (our s t a n d a r d s e q u e n c e for t e s t r u n s was b a s e d on I R = 1). A caI1 of a n y of t h e five r o u t i n e s will cause the initialization to t a k e effect (inside S U N I F () , s e c o n d part) a n d to r e s e t I R to-1. F r o m t h e n on this I R < 0 signifies t h a t h e n c e f o r t h t h e p a r a m e t e r I R is a d u m m y variable. Permission to copy without fee all or part of this maternal is granted provided that the copies are not made or dlstmbuted for direct commercial advantage, the ACM copyright notice and the title of …
[1] Joachim H. Ahrens,et al. Generating gamma variates by a modified rejection technique , 1982, CACM.
[2] Joachim H. Ahrens,et al. Computer methods for sampling from the exponential and normal distributions , 1972, CACM.
[3] J. H. Ahrens,et al. Extensions of Forsythe’s method for random sampling from the normal distribution , 1973 .
[4] Joachim H. Ahrens,et al. Computer Generation of Poisson Deviates from Modified Normal Distributions , 1982, TOMS.