Laplace Distribution#
Univariate, Continuous, Symmetric, Unbounded, Light-tailed
The Laplace or Laplacian distribution is a continuous probability distribution named after Pierre-Simon Laplace. It is also known as the double exponential distribution due to its shape: it consists of two exponential distributions of the same scale back to back about \(x = \mu\). The difference between two independent identically distributed (i.i.d.) exponential random variables follows a Laplace distribution.
The Laplace distribution is characterized by two parameters: the location parameter \(\mu\) and the scale parameter \(b\).
The Laplace distribution is widely used due to its ability to model sharp peaks and heavy tails. In signal processing, it models coefficients in speech recognition and image compression. In regression analysis, the Lasso regression can be thought of as a Bayesian regression with a Laplacian prior for the coefficients, altought sparsity is better achieved with priors such as horseshoe instead of Laplace. It is also used in hydrology, finance, and other fields to model extreme events and outliers.
Key properties and parameters#
Support |
\(x \in \mathbb{R}\) |
Mean |
\(\mu\) |
Variance |
\(2b^2\) |
Parameters:
\(\mu\) : (float) Location parameter.
\(b\) : (float) Scale parameter, \(b > 0\).
Probability Density Function (PDF)#
Cumulative Distribution Function (CDF)#
/home/docs/checkouts/readthedocs.org/user_builds/preliz/envs/stable/lib/python3.11/site-packages/pytensor/link/c/cmodule.py:2986: UserWarning: PyTensor could not link to a BLAS installation. Operations that might benefit from BLAS will be severely degraded.
This usually happens when PyTensor is installed via pip. We recommend it be installed via conda/mamba/pixi instead.
Alternatively, you can use an experimental backend such as Numba or JAX that perform their own BLAS optimizations, by setting `pytensor.config.mode == 'NUMBA'` or passing `mode='NUMBA'` when compiling a PyTensor function.
For more options and details see https://pytensor.readthedocs.io/en/latest/troubleshooting.html#how-do-i-configure-test-my-blas-library
warnings.warn(
See also
Common Alternatives:
Asymmetric Laplace - A generalization of the Laplace distribution with asymmetric tails.
Related Distributions:
Exponential - The Laplace distribution is the difference between two i.i.d. exponential random variables.