LaplaceDistribution
class LaplaceDistribution(val mu: Double = 0.0, val scale: Double = 1.0) : ContinuousDistribution(source)
Represents the Laplace distribution (also known as the double exponential distribution), defined by its location mu and scale parameters.
The Laplace distribution is a symmetric, peaked distribution centered at mu with exponentially decaying tails on both sides. Compared to the normal distribution with the same variance, the Laplace has a sharper peak at the center and heavier tails, meaning extreme values are more likely. This makes it useful in robust statistics where outliers are common, in signal processing for modeling Laplacian noise, and in Bayesian inference as a sparsity-promoting prior (the Lasso penalty in regression corresponds to a Laplace prior). The support is the entire real line.
Example:
val dist = LaplaceDistribution(mu = 0.0, scale = 1.0)
dist.pdf(0.0) // 0.5 (peak density at the center)
dist.cdf(0.0) // 0.5 (symmetric around mu)
dist.quantile(0.75) // 0.6931... (third quartile)
dist.mean // 0.0
dist.variance // 2.0Content copied to clipboard