Discrete Laplace distribution: Probability mass function, distribution function, and random generation for the discrete Laplace distribution with parameter \(0 <= p < 1\).
Description
Calculates the mass of observations from the discrete Laplace distribution.
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x].
n
number of observations to generate
Value
'ddisclap' gives the probability mass, 'pdisclap' gives the distribution function, and 'rdisclap' generates random deviates.
Details
The probability mass function for the discrete Laplace distribution with parameter \(0 < p < 1\) is given by \(P(X = x) = \frac{1-p}{1+p} p^x\) for \(x \in \mathbf{Z}\).
If x is a vector, then p must have either length 1 or the same length as x. If p has length 1, then the value will be reused for all values in x.