[Math] CDF of a density function with absolute value.

probabilityprobability distributions

If X is a random variable with the density function $f(x)=\frac{e^{-|x|}}{2}$, what is the CDF of X?

My first inclination is to take $\int_0^\infty \mathrm{e}^{x}/2\,\mathrm{d}x$ and $\int_{-\infty}^0 \mathrm{e}^{-x}/2\,\mathrm{d}x$.

Is this all?

Best Answer

Assuming that $$f(x)=\frac{e^{-|x|}}{2}$$ which is the Laplace distribution, your idea of splitting the function is correct! But, the cdf is itself a function not a single number! That means that your integration limits should depend on x. Therefore, you have to disriminate cases according to the value of x:

  1. $x\le 0$: then $$F_X(x)=\int_{-\infty}^{x}f(t)~dt=\int_{-\infty}^{x}\frac{e^t}{2}~dt$$
  2. $x>0$: then $$F_X(x)=\int_{-\infty}^{x}f(t)~dt=\int_{-\infty}^{0}\frac{e^t}{2}~dt+\int_{0}^{x}\frac{e^{-t}}{2}~dt$$
Related Question