[Math] Probability Density Function – Find c

probability

I have a continuous random variable X that has a probability density function of $f(x) = c e^{-|x-1|}$ for all x between negative $-\infty$ and $\infty$.

How could I go about finding the value for c, and what should it be?

Thanks!

Best Answer

$c$ is determined by the equation

$$c \int_{-\infty}^{\infty} dx \, e^{-|x-1|} = 1$$

Now,

$$\begin{align}\int_{-\infty}^{\infty} dx \, e^{-|x-1|} &= \int_{-\infty}^1 dx \, e^{(x-1)} + \int_1^{\infty} dx \, e^{-(x-1)}\\ &= 2 \int_0^{\infty} dx \, e^{-x}\\ &= 2\end{align}$$

Thus, $c=1/2$.