Let $X, Y$ be independent random variables exponentially distributed with parameter 1. Find the $E(|X-Y|)$.
My approach :
Let $Z = X - Y $. Then, the goal is to find $E(|Z|) = \int_{-\infty}^{\infty}{|z|f_Z(z)dz}$. So, in order to find the density for $Z$, I use a convolution method:
$$ F_Z(z) = P(Z \leq z) = P(X - Y \leq z) = \iint_{X-Y \leq z}{f_X(x)f_Y(y)dxdy} = \int_{-\infty}^{\infty}\int_{-\infty}^{z+y}{f_X(x)f_Y(y)dxdy} = \int_{-\infty}^{\infty}F_X(z+y)f_Y(y)dy$$
Now, differentiating with respect to z, we can get the density of z.
$$ \frac{d}{dz}\left(F_Z(z)\right) = f_Z(z) = \int_{-\infty}^{\infty}{f_X(z+y)f_Y(y)dy} $$
Since X, Y are $\sim Exp(1)$, their densities are known and the integral simplifies to:
$$ f_Z(z) = \int_{0}^{\infty}{e^{-z}e^{-2y}dy} = -\frac{1}{2}e^{-z} $$
Then, the expectation value is:
$$ E(|Z|) = \int_{-\infty}^{\infty}{-\frac{1}{2}|z|e^{-z}dz} = \int_{-\infty}^{0}{\frac{1}{2}ze^{-z}dz} + \int_{0}^{\infty}{-\frac{1}{2}ze^{-z}dz} $$
I thought that this was correct, but I am confused on the bounds of Z since evaluating this integral from $-\infty$ makes the expression divergent.
Is it the case that since $z \geq 0$, then the integral for the expectation value simplifies to:
$$ E(|Z|) = \int_{-\infty}^{\infty}{-\frac{1}{2}|z|e^{-z}dz} = \int_{0}^{\infty}{-\frac{1}{2}ze^{-z}dz} $$ ?