The zero-truncated geometric distribution with prob
\(= p\)
has probability mass function
$$%
p(x) = p (1-p)^{x - 1}$$
for \(x = 1, 2, \ldots\) and \(0 < p < 1\), and
\(p(1) = 1\) when \(p = 1\).
The cumulative distribution function is
$$P(x) = \frac{F(x) - F(0)}{1 - F(0)},$$
where \(F(x)\) is the distribution function of the standard geometric.
The mean is \(1/p\) and the variance is \((1-p)/p^2\).
In the terminology of Klugman et al. (2012), the zero-truncated
geometric is a member of the \((a, b, 1)\) class of
distributions with \(a = 1-p\) and \(b = 0\).
If an element of x
is not integer, the result of
dztgeom
is zero, with a warning.
The quantile is defined as the smallest value \(x\) such that
\(P(x) \ge p\), where \(P\) is the distribution function.