According to the Wiki article on the Laplace distribution,
$$F(x)=\int\limits_{-\infty}^x f(u)du=\begin{cases} \frac{1}{2}\exp(\frac{x-\mu}{b}) && \text{if }x< \mu \\ 1-\frac{1}{2}\exp(-\frac{x-\mu}{b}) &&\text{if } x\geq \mu\end{cases},$$
where
$$f(x|\mu,b)=\frac{1}{2b}\exp\big(-\frac{|x-\mu|}{b}\big). $$
I get the $x<\mu$ case. But for the other one, if I evaluate the integral, I get
$$\int\limits_{-\infty}^x \frac{1}{2b}\exp\big(-\frac{u-\mu}{b}\big)du=-\frac{1}{2}\exp\big(-\frac{u-\mu}{b}\big),$$ which I need to evaluate between $-\infty$ and $x$. Substitute in $x$, and I get $$-\frac{1}{2}\exp(-\frac{x-\mu}{b}).$$
But why should I get $1$ if I substitute in $-\infty$?
$\endgroup$1 Answer
$\begingroup$For $x\ge\mu$, you have $$\begin{align*} F(x)\bigg|_{x\ge\mu}&=\int_{-\infty}^x f(t)\,\mathrm{d}t\\[1ex] &=\frac{1}{2b}\left\{\color{red}{\int_{-\infty}^\mu+\int_\mu^x}\right\}\exp\left(-\frac{|t-\mu|}{b}\right)\,\mathrm{d}t\\[1ex] &=F(x)\bigg|_{x=\mu}+\frac{1}{2b}\int_\mu^x \exp\left(-\frac{t-\mu}{b}\right)\,\mathrm{d}t\\[1ex] &=\frac{1}{2}-\frac{b}{2b}\bigg[\exp\left(-\frac{t-\mu}{b}\right)\bigg]_\mu^x\\[1ex] &=\frac{1}{2}-\frac{1}{2}\left(\exp\left(-\frac{x-\mu}{b}\right)-1\right)\\[1ex] &=1-\frac{1}{2}\exp\left(-\frac{x-\mu}{b}\right) \end{align*}$$ I believe it's the red part mixing you up. You need to split up the interval of integration because the absolute value changes the behavior of the integrand past $x=\mu$. The lower limit of $-\infty$ isn't applicable for $x\ge\mu$.
Analogously, if you were to compute the simpler integral $$\int_{-1}^1|x|\,\mathrm{d}x$$ you would split up $|x|$ into its constituent cases: $$|x|=\begin{cases}x&\text{for }x\ge0\\-x&\text{for }x<0\end{cases}$$ so that the integral is equal to $$\left\{\int_{-1}^0+\int_0^1\right\}|x|\,\mathrm{d}x=-\int_{-1}^0x\,\mathrm{d}x+\int_0^1x\,\mathrm{d}x\neq\int_{-1}^1x\,\mathrm{d}x$$
$\endgroup$ 1