y=exy = e^{-|x|}

Graph of the Two-Sided Exponential y=exy = e^{-|x|}

y=exy = e^{-|x|} makes the decay of the exponential symmetric about the origin. Also called the two-sided exponential, it becomes the density of the Laplace distribution in probability once multiplied by 12\dfrac{1}{2}1. Set beside the Gaussian y=ex2y = e^{-x^2}, the differences in the shape of the peak and the weight of the tails are easy to see.

Domain and range

  • The domain is all real numbers
  • The range is 0<y10 < y \leq 1
  • The maximum 11 is attained at x=0x = 0
  • It is an even function

Symmetry

Since f(x)=f(x)f(-x) = f(x) the function is even and symmetric about the yy-axis. It is two exponential curves joined together: exe^{-x} for x0x \geq 0 and exe^{x} for x0x \leq 0.

The corner at the origin

At the origin, where the two pieces meet, the derivatives from the two sides disagree.

ApproachDerivative
from the right1-1
from the left+1+1

The function is therefore not differentiable at the origin, and the graph has a sharp corner. That contrasts with the smooth rounded summit of the Gaussian.

Monotonicity and concavity

For x>0x > 0 we have y=ex<0y' = -e^{-x} < 0, so the function decreases, and for x<0x < 0 we have y=ex>0y' = e^{x} > 0, so it increases. The second derivative is y=ex>0y'' = e^{-|x|} > 0 for x0x \neq 0, so both sides are concave up and there is no inflection point. As x±x \to \pm\infty we get y0y \to 0, making the xx-axis a horizontal asymptote.

Comparison with the Gaussian

The two graphs meet at x=0x = 0 and x=±1x = \pm 1, since ex=ex2e^{-|x|} = e^{-x^2} gives x=x2|x| = x^2; at the crossings the common value is 1e0.368\dfrac{1}{e} \approx 0.368.

xxexe^{-|x|}ex2e^{-x^2}
0.50.50.6065\approx 0.60650.7788\approx 0.7788
110.3679\approx 0.36790.3679\approx 0.3679
220.1353\approx 0.13530.0183\approx 0.0183
330.0498\approx 0.04980.000123\approx 0.000123

For x<1|x| < 1 the Gaussian is above, and for x>1|x| > 1 the two-sided exponential is. In other words the Gaussian bulges more in the middle while the two-sided exponential has the heavier tails. At x=3x = 3 the gap is more than four hundredfold.

The Laplace distribution

The integral over the whole line is 22, so 12ex\dfrac{1}{2}e^{-|x|} is a probability density. That is the standard Laplace distribution.

QuantityValue
Mean00
Variance22
Mean absolute deviation11

The difference of two independent exponential variables is also known to follow this distribution.

Fourier transform

exeiωxdx=21+ω2\int_{-\infty}^{\infty} e^{-|x|}e^{-i\omega x}\,dx = \frac{2}{1+\omega^2}

The image is the shape of the witch of Agnesi. A heavy-tailed peak with a corner is carried over into a smooth rational function.

Applications

In statistics the Laplace distribution is the maximum-entropy distribution when the mean absolute deviation, rather than the variance, is held fixed. It pairs with the fact that the Gaussian is the maximum-entropy distribution when the variance is fixed.

In machine learning, placing a Laplace prior on the coefficients corresponds to L1L^1 regularization. The corner at the origin is what drives many coefficients to be exactly 00, giving the sparse solutions that method is known for.

  1. Laplace distribution, Wikipedia