The Geometric distribution with prob
\(= p\) has density
$$p(x) = p (1-p)^x$$
for \(x = 0, 1, 2, \ldots\), \(0 < p \le 1\).
The generation algorithm uses guide table based inversion for
\(p > 0.02\) and method ‘DARI’ otherwise.
The parameters lb
and ub
can be used to generate
variates from the Geometric distribution truncated to the interval
(lb
,ub
).