Density, distribution function, quantile function and random generation for the Weighted Geometric distribution.
Usage
dwgd(x, alpha, lambda, log = FALSE)
pwgd(q, alpha, lambda, lower.tail = TRUE, log.p = FALSE)
qwgd(p, alpha, lambda, lower.tail = TRUE)
rwgd(n, alpha, lambda)Arguments
- x, q
vector of quantiles.
- alpha, lambda
are parameters.
- log, log.p
logical; if TRUE, probabilities p are given as log(p).
- lower.tail
logical; if TRUE (default), probabilities are \(P\left[ X\leq x\right]\), otherwise, \(P\left[ X>x\right] \).
- p
vector of probabilities.
- n
number of observations. If
length(n) > 1, the length is taken to be the number required.
Value
dwgd gives the density, pwgd gives the distribution
function, qwgd gives the quantile function and rwgd generates
random deviates.
Details
The Weighted Geometric distribution with parameters \(\alpha\) and \(\lambda\), has density $$f\left( x\right) =\frac{\left( 1-\alpha \right) \left( 1-\alpha ^{\lambda+1}\right) }{1-\alpha ^{\lambda }}\alpha ^{x-1} \left( 1-\alpha ^{\lambda x}\right),$$ where $$x\in \mathbb {N} =1,2,...~,~\lambda >0~and~0<\alpha <1.$$
