Next: Shuffling and Sampling, Previous: The Hypergeometric Distribution, Up: Random Number Distributions
This function returns a random integer from the logarithmic distribution. The probability distribution for logarithmic random variates is,
p(k) = {-1 \over \log(1-p)} {(p^k \over k)}for k >= 1.
This function computes the probability p(k) of obtaining k from a logarithmic distribution with probability parameter p, using the formula given above.