Premium
Efficient Generation of Logarithmically Distributed Pseudo‐Random Variables
Author(s) -
Kemp A. W.
Publication year - 1981
Publication title -
journal of the royal statistical society: series c (applied statistics)
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 1.205
H-Index - 72
eISSN - 1467-9876
pISSN - 0035-9254
DOI - 10.2307/2346348
Subject(s) - random variable , mathematics , statistics , computer science
S ummary A one‐line algorithm LB is given for generating samples from the logarithmic series distribution. Two independent uniform random variables are converted into a single logarithmic variable by use of a structural property of the distribution. Faster versions of the method, algorithms LBM and LK, employ simple initial tests which identify those pairs of uniform random variables which yield the most frequently occurring values of the logarithmic variable. Comparison with a search method, algorithm LS, shows that the search method is faster when the parameter a of the logarithmic distribution is less than about 0‐95. However, values of a greater than 095 are often encountered. In ecological contexts a ranges from 0‐9 to 0‐9999; here the search method becomes prohibitively slow, and the algorithms based on the structural method are preferable. Both methods lead to very short, portable, procedures which require a trivial amount of storage.