The probability mass function and random number generator for the
discrete Gaussian distribution with mean mu and scale parameter sigma.
Usage
ddnorm(x, mu = 0, sigma = 1, log = FALSE)
rdnorm(n, mu = 0, sigma = 1)
Value
ddnorm() returns a numeric vector representing the probability mass function of the
discrete Gaussian distribution.
rdnorm() returns a numeric vector of random samples from the discrete Gaussian distribution.
Arguments
x
vector of quantiles.
mu
location parameter.
sigma
scale parameter.
log
logical; if TRUE, log unnormalized probabilities are returned.
n
number of random deviates.
Details
Probability mass function
$$
P[X = x] = \dfrac{e^{-(x - \mu)^2/2\sigma^2}}{\sum_{y \in \mathbb{Z}} e^{-(x-\mu)^2/2\sigma^2}}.
$$
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")