Let $X$ be a random variable with the PDF
$f_X(x)=\frac{\lambda}{2}e^{-\lambda |x|}, \lambda > 0$
Verify that $f_X$ satisfies the normalization property and evaluate the mean and the variance of $X$.
Solution:
(a). Notice that $f_X(x)$ is an even function. Therefore
$\int_{-\infty}^{+\infty} \frac{\lambda}{2}e^{\lambda|x|}dx
= 2 \times \frac{\lambda}{2}\int_{-\infty}^{0}e^{-\lambda \cdot -x}dx
= \lambda \int_{-\infty}^{0}e^{\lambda x}dx
= e^{\lambda x} \bigg\rvert_{-\infty}^{0}
= 1
$
$\because \int_{-\infty}^{+\infty}f_X(x)dx = 1 \therefore f_X(x)$ satisfies the normalization property.
(b) $\mathbb{E}[X] = \int_{-\infty}^{+\infty}xf_X(x)dx
= \int_{-\infty}^{+\infty}x \frac{\lambda}{2} e^{-\lambda |x|} dx$
$\because f_X(x)$ is an even function and $x$ is an odd function.
$\therefore xf_X(x)$ is an odd function. Thus, $\int_{-\infty}^{+\infty}xf_X(x)dx = 0$.
$\mathbb{E}[X^] = \int_{-\infty}^{+\infty} x^2 f_X(x)dx
=2 \int_{0}^{+\infty}x^2 \frac{\lambda}{2} e^{-\lambda x}dx
= \int_{0}^{+\infty}x^2 \lambda e^{-\lambda x}dx
$
The second step is because $x^2f(x)$ is an even function. By using integral by part, we got
$\int_{-\infty}^{+\infty}x^2 f_X(x) dx
= \big(-x^2 \cdot e^{-\lambda x} - \frac{2}{\lambda}(x e^{-\lambda x} + \frac{1}{\lambda} e^{-\lambda x}) \big) \bigg\rvert_{0}^{+\infty}
$
And note that, by using L'Hospital's rule, we can show that
$\lim_{x \to \infty} -x^2e^{-\lambda x} = \lim_{x \to \infty} \frac{-x^2}{e^{\lambda x}} = 0$.
Hence, $\mathbb{E}[X^2] = \frac{2}{\lambda^2}$ and $VAR(X) = \mathbb{E}[X^2] - \mathbb{E}[X] = \frac{2}{\lambda^2} - 0 = \frac{2}{\lambda^2}$