PLAYGROUND

Discrete Laplace distribution

Why it exists

Discrete Laplace is symmetric on the integers, with mass decreasing geometrically with distance from loc. It is an integer analogue of Laplace and a natural noise law for signed count differences.

Alternative names

It is also called the discrete Laplace distribution, bilateral geometric, or Laplace law on the integers.

Constructions and limits

In its symmetric construction it is the difference of two independent geometric variables with equal rates. Skellam plays a parallel role for Poisson differences; continuous Laplace is the real-line analogue.

Applications

In differential privacy, discrete noise allows count releases without fractional outputs. Noise level must be selected with sensitivity and privacy guarantee, not visual fit alone.

Do not read a as standard deviation: its variance relationship is nonlinear and depends on discretization.

Integer noise on both sides of zero

An intuitive construction subtracts two independent Geometric variables with the same parameter. Positive and negative values balance, and probability decreases geometrically with distance from the centre. That genealogy explains both the Discrete Laplace name and its relation to count differences.

In differential privacy, noise of this kind can be added to an integer-valued query. Its decay parameter calibrates the tradeoff between accuracy and concealment. Releasing a clipped or rounded value afterwards may change both the guarantee and the effective distribution. In integer time series it can also serve as an innovation law, provided that symmetry around loc is defensible.

Decision guide

A good candidate when: integer differences are symmetric around a location and their tails decay geometrically.

Compare it with: Skellam when the difference comes from two Poisson counts. Discrete Laplace describes the net shape but does not identify two separate generating rates.

References

  • SciPy reference: scipy.stats.dlaplace — definition and parameterization
  • Johnson, N. L., Kemp, A. W. & Kotz, S. (2005). Univariate Discrete Distributions, 3rd ed. Wiley.
  • Inusah, S. & Kozubowski, T. J. (2006). A discrete analogue of the Laplace distribution. Journal of Statistical Planning and Inference, 136(3), 1090–1102.
  • Dwork, C. & Roth, A. (2014). The Algorithmic Foundations of Differential Privacy. Foundations and Trends in Theoretical Computer Science, 9(3–4), 211–407.

Discrete Laplace Distribution: equations and calculator

Distribution defintion

XDiscreteLaplace(a,Loc)X\sim\mathrm{DiscreteLaplace}\left(a,\text{Loc}\right)

Distribution domain

xLoc+Z{,Loc1,Loc,Loc+1,}x\in\text{Loc}+\mathbb{Z}\equiv\left\{\dots,\text{Loc}-1,\text{Loc},\text{Loc}+1,\dots\right\}

Parameters domain and parameters constraints

aR+,LocZa\in\mathbb{R}^{+},\text{Loc}\in\mathbb{Z}

Cumulative distribution function

FX(x)={ea(xLoc+1)1+eaif x<Loc1ea(xLoc)1+eaif xLocF_{X}\left(x\right)=\left\{\begin{array}{cl}\dfrac{e^{a\left(x-\text{Loc}+1\right)}}{1+e^{a}} & \text{if } x < \text{Loc} \\[6pt] 1-\dfrac{e^{-a\left(x-\text{Loc}\right)}}{1+e^{a}} & \text{if } x \geq \text{Loc} \end{array}\right.

Probability mass function

fX(x)=tanh ⁣(a2)eaxLocf_{X}\left(x\right)=\tanh\!\left(\frac{a}{2}\right)e^{-a\left|x-\text{Loc}\right|}

Percent point function/Sample

FX1(u)=Loc+{ln ⁣(u(1+ea))a1if u<12ln ⁣((1u)(1+ea))aif u12F^{-1}_{X}\left(u\right)=\text{Loc}+\left\{\begin{array}{cl}\left\lceil\dfrac{\ln\!\left(u\left(1+e^{a}\right)\right)}{a}-1\right\rceil & \text{if } u < \tfrac{1}{2} \\[6pt] \left\lceil-\dfrac{\ln\!\left(\left(1-u\right)\left(1+e^{a}\right)\right)}{a}\right\rceil & \text{if } u \geq \tfrac{1}{2} \end{array}\right.

Parametric centered moments

E[Xk]=μk=xLoc+ZxkfX(x)E[X^k]=\mu'_{k}=\sum_{x\in\text{Loc}+\mathbb{Z}}x^{k}f_{X}\left(x\right)

Parametric mean

Mean(X)=μ1=Loc\mathrm{Mean}(X)=\mu'_{1}=\text{Loc}

Parametric variance

Variance(X)=(μ2μ12)=2ea(1ea)2\mathrm{Variance}(X)=(\mu'_{2}-\mu'^{2}_{1})=\dfrac{2e^{-a}}{\left(1-e^{-a}\right)^{2}}

Parametric skewness

Skewness(X)=μ33μ2μ1+2μ13(μ2μ12)1.5=0\mathrm{Skewness}(X)=\frac{\mu'_{3}-3\mu'_{2}\mu'_{1}+2\mu'^{3}_{1}}{(\mu'_{2}-\mu'^{2}_{1})^{1.5}}=0

Parametric kurtosis

Kurtosis(X)=μ44μ1μ3+6μ12μ23μ14(μ2μ12)2=5+cosh(a)\mathrm{Kurtosis}(X)=\frac{\mu'_{4}-4\mu'_{1}\mu'_{3}+6\mu'^{2}_{1}\mu'_{2}-3\mu'^{4}_{1}}{(\mu'_{2}-\mu'^{2}_{1})^{2}}=5+\cosh(a)

Parametric median

Median(X)=Loc\mathrm{Median}(X)=\text{Loc}

Parametric mode

Mode(X)=Loc\mathrm{Mode}(X)=\text{Loc}

Additional information and definitions

a:Shape parameter, controls how rapidly the PMF decays from Loca:\text{Shape parameter, controls how rapidly the PMF decays from }\text{Loc}
Loc:Integer location parameter (peak of the distribution)\text{Loc}:\text{Integer location parameter (peak of the distribution)}
u:Uniform[0,1] random varibleu:\text{Uniform[0,1] random varible}
tanh ⁣(a2)=1ea1+ea\tanh\!\left(\tfrac{a}{2}\right)=\dfrac{1-e^{-a}}{1+e^{-a}}
cosh(a)=12 ⁣(ea+ea)\cosh(a)=\tfrac{1}{2}\!\left(e^{a}+e^{-a}\right)
x:Floor function\lfloor{x}\rfloor: \text{Floor function}
x:Ceiling Function\lceil{x}\rceil: \text{Ceiling Function}