The probability mass function and random number generator for the
discrete Laplacian distribution.
Usage
ddlaplace(x, scale = 1, log = FALSE)
rdlaplace(n, scale = 1)
Value
ddlaplace() returns a numeric vector representing the probability mass function of the
discrete Laplace distribution.
rdlaplace() returns a numeric vector of random samples from the discrete Laplace distribution.
Arguments
x
a vector of quantiles.
scale
the scale parameter.
log
logical; if TRUE, probabilities are given as log(p).
n
number of random deviates.
Details
Probability mass function
$$
P[X=x] = \dfrac{e^{1/t} - 1}{e^{1/t} + 1} e^{-|x|/t}.
$$
References
Canonne, C. L., Kamath, G., & Steinke, T. (2020). The Discrete Gaussian for Differential Privacy.
arXiv. tools:::Rd_expr_doi("https://doi.org/10.48550/ARXIV.2004.00010")