The zero-modified geometric distribution with prob
\(= p\)
and p0
\(= p_0\) is a discrete mixture between a
degenerate distribution at zero and a (standard) geometric. The
probability mass function is \(p(0) = p_0\) and
$$%
p(x) = \frac{(1-p_0)}{(1-p)} f(x)$$
for \(x = 1, 2, \ldots\), \(0 < p < 1\) and \(0 \le
p_0 \le 1\), where \(f(x)\) is the probability mass
function of the geometric.
The cumulative distribution function is
$$P(x) = p_0 + (1 - p_0) \left(\frac{F(x) - F(0)}{1 - F(0)}\right)$$
The mean is \((1-p_0) \mu\) and the variance is
\((1-p_0) \sigma^2 + p_0(1-p_0) \mu^2\),
where \(\mu\) and \(\sigma^2\) are the mean and variance of
the zero-truncated geometric.
In the terminology of Klugman et al. (2012), the zero-modified
geometric is a member of the \((a, b, 1)\) class of
distributions with \(a = 1-p\) and \(b = 0\).
The special case p0 == 0
is the zero-truncated geometric.
If an element of x
is not integer, the result of
dzmgeom
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.