Laplace Distribution Calculator - Peak Density & Graph
Compute the peak probability density of a Laplace distribution from its location and scale parameters, and view the density curve on an interactive graph.
Laplace Distribution Calculator
Documentation
What is the Laplace distribution?
The Laplace distribution, also called the double exponential distribution, is a continuous probability distribution shaped like two exponential curves glued back to back at their peak. It is symmetric around a central value and has heavier tails than the normal distribution, so it assigns more probability to extreme values. The Laplace distribution calculator on this page finds the peak probability density of the distribution from a location parameter and a scale parameter, and draws the full density curve.
The distribution is named after Pierre-Simon Laplace, the French mathematician who first described it in 1774.
Laplace distribution formula
The probability density function (PDF) of the Laplace distribution is:
- x is any point on the number line.
- μ (mu), the location parameter, is the center of the distribution. It is also the mean and the median.
- b, the scale parameter, controls how spread out the distribution is. It must be greater than 0.
- |x − μ| is the distance between x and the center, ignoring direction.
The curve reaches its highest point exactly at x = μ. At that point the formula simplifies, because |μ − μ| = 0 and exp(0) = 1, leaving:
This peak value, 1/(2b), is the number the calculator reports.
How to use the Laplace distribution calculator
- Enter the location parameter (μ). This sets where the distribution is centered.
- Enter the scale parameter (b). This must be a positive number; the wider the value, the flatter and more spread out the curve.
- The calculator shows the peak density, 1/(2b), and plots the density curve f(x) across a range around μ.
The calculator does not take a separate x value. It always reports the density at the distribution's own peak, x = μ, because that is the single most useful summary number for comparing distributions with different scales. To find the density at some other point, use the formula above with the x value of interest, or read the height off the graph.
Worked example
Take a location of μ = 4 and a scale of b = 2.
- Check that b is positive: 2 > 0, so the inputs are valid.
- The peak occurs at x = μ = 4, where |x − μ| = 0.
- Compute the peak density: 1 / (2 × 2) = 1 / 4 = 0.25.
The calculator displays 0.250000. The plotted curve peaks at (4, 0.25) and falls away symmetrically on both sides, spanning from μ − 4b to μ + 4b, that is, from −4 to 12 in this case.
Because the peak density formula, 1/(2b), does not include μ, changing the location only shifts the curve left or right. It does not change its height. Only the scale parameter changes the height.
More examples
| Location (μ) | Scale (b) | Peak density, 1/(2b) |
|---|---|---|
| 0 | 1 | 0.500000 |
| 2 | 1 | 0.500000 |
| 0 | 3 | 0.166667 |
| −1 | 0.5 | 1.000000 |
Mean, variance, and standard deviation
For a Laplace distribution with location μ and scale b:
- Mean = μ
- Median = μ
- Variance = 2b²
- Standard deviation = b√2
Laplace distribution vs. normal distribution
Both distributions are symmetric and bell-shaped, and both are fully described by a center and a spread parameter. The difference is in the tails. The normal distribution's density falls off in proportion to the square of the distance from the mean, so extreme values become vanishingly rare very quickly. The Laplace distribution's density falls off in proportion to the plain distance from the mean, so extreme values stay comparatively more likely. This makes the Laplace distribution useful whenever real data has more outliers than a normal distribution would predict.
Common uses
- Signal and image processing: modeling noise and compressing images, since pixel or signal differences often cluster near zero with occasional large jumps.
- Differential privacy: the Laplace mechanism adds Laplace-distributed noise to query results to protect individual data while preserving overall accuracy.
- Robust statistics and regression: Lasso regression uses a Laplace-shaped prior, which favors solutions where many coefficients are exactly zero.
- Finance: modeling asset returns, which tend to have heavier tails than a normal distribution suggests.
- Seismology: appears in models of earthquake magnitude patterns related to the Gutenberg-Richter law.
Frequently asked questions
What does the calculator's result mean?
It is the peak, or maximum, value of the probability density function, equal to 1/(2b). This is the height of the curve at its center, x = μ.
Why doesn't the calculator ask for an x value?
The peak density, 1/(2b), is the same at every x value equal to μ, so no separate x input is needed to find it. It is the standard single number used to compare how tall and narrow, or short and wide, two Laplace distributions are. The full curve, showing density at every x, is available on the graph.
How do I find the density at a point other than the peak?
Use the formula f(x) = (1/2b) × exp(−|x − μ|/b) with the x value of interest, or read the height directly from the plotted curve.
How is the Laplace distribution different from the exponential distribution?
The Laplace distribution can be built from two exponential distributions. If X and Y are independent exponential random variables with the same rate, then X − Y follows a Laplace distribution centered at 0.
What are typical uses of the Laplace distribution?
It is used in signal processing, image compression, differential privacy, robust statistics, Lasso regression, and modeling financial returns and earthquake magnitudes, wherever real data shows more extreme values than a normal distribution predicts.
Can the Laplace distribution be negative or is it only for positive values?
It is defined for all real numbers, both positive and negative, unlike the exponential distribution, which only takes non-negative values.
References
- Kotz, S., Kozubowski, T., & Podgórski, K. (2001). The Laplace Distribution and Generalizations. Birkhäuser, Boston, MA.
- "Laplace distribution." Wikipedia, Wikimedia Foundation. https://en.wikipedia.org/wiki/Laplace_distribution