The Logarithmic Distribution¶

gsl_ran_logarithmic(p)

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)} {\left(p^k \over k\right)}$

for $$k \geq 1$$.

gsl_ran_logarithmic_pdf(k, p)

This function computes the probability $$p(k)$$ of obtaining $$k$$ from a logarithmic distribution with probability parameter p, using the formula given above.