using Distributions
using StatsPlots
using QuadGK
function laplacedistapprox(dist)
a = median(dist)
b = quadgk(x -> abs(x - a)*pdf(dist, x), extrema(dist)...)[1]
laplace = Laplace(a, b)
end
laplacedistapprox (generic function with 1 method)
dist = Normal()
laplace = laplacedistapprox(dist)
lnormal = Normal(mean(laplace), std(laplace))
plot(dist; label="dist")
plot!(laplace; label="laplace", ls=:dash)
plot!(lnormal; label="lnormal", ls=:dashdot)