What is the Laplace Distribution?
The Laplace distribution, also called the double-exponential distribution, is a continuous probability distribution that is symmetric about its center. It looks like two exponential distributions placed back to back, producing a sharp peak (a cusp) at the location parameter and heavier tails than a normal distribution. It is widely used in signal processing, robust regression (least absolute deviations), Bayesian inference (the LASSO prior), and finance for modeling returns with fat tails. This is a universal mathematics tool that applies identically anywhere.
How to Use This Calculator
Enter three numbers: x, the value of the random variable; the location parameter mu, which sets the center (mean and median); and the scale parameter b, which must be strictly positive and controls the spread. The calculator returns the probability density f(x), the lower cumulative probability P(X ≤ x), and the upper cumulative probability P(X > x). The two cumulative values always sum to exactly 1.
The Formula Explained
The density is $$f(x) = \frac{1}{2\,b}\exp\!\left(-\frac{\left|x - \mu\right|}{b}\right).$$ The cumulative function is piecewise: when \(x < \mu\), \(F(x) = 0.5\cdot\exp\!\left(\frac{x - \mu}{b}\right)\); when \(x \ge \mu\), \(F(x) = 1 - 0.5\cdot\exp\!\left(-\frac{x - \mu}{b}\right)\). Using the absolute deviation keeps the exponent non-positive, so exp() never overflows. The mean equals \(\mu\) and the variance equals \(2b^2\).
Worked Example
Let \(x = 1\), \(\mu = 0\), \(b = 1\). The deviation is \(d = 1\). PDF: $$f(1) = 0.5\cdot\exp(-1) = 0.18394.$$ Since \(x \ge \mu\), \(F(1) = 1 - 0.5\cdot\exp(-1) = 0.81606\), and the upper probability is \(1 - 0.81606 = 0.18394\).
FAQ
Why must b be positive? The scale appears in a denominator and inside the exponential; if \(b \le 0\) the density is undefined, so the calculator validates it.
What happens at x = mu? The density reaches its peak value \(\frac{1}{2b}\) and both cumulative probabilities equal 0.5. The function has a non-differentiable cusp at this point.
Is the distribution symmetric? Yes. \(f(\mu + t) = f(\mu - t)\) and \(F(\mu + t) = 1 - F(\mu - t)\) for any \(t\).