# Find the density function of random variable Z

The random variable Z is equal to X + Y. Where X and Y are independent and they both are exponentially distributed with parameter $\lambda = 1$;

How do i find the probability density function of Z? Firstly i searched about this and I've found about convolution yet I don't manage to apply it properly?

$$F_Z(z) = \int_{-\infty}^{\infty}F_X(x)F_Y(z-x) dx$$ And from this i go to

$$\int_{0}^{\infty}e^{-x}e^{-(z-x)}dx = \int_{0}^{\infty}e^{-z}e^{-x+x}dx = \int_{0}^{\infty}e^zdx = xe^{-z}|_0^{\infty}$$ which seems clearly wrong??

How can i solve it? Can this be solved in the following way : find the common distribution function and use the derivates of it to get to the density function?

Could really use some references to consult as well!

Thank you!

• Two mistakes: first, $F_X=F_Y$ is not $F_X(x)=e^{-x}$ but $$F_X(x)=1-e^{-x}$$ second, the convolution formula for CDFs is $$F_Z(z)=\int_\mathbb RF_X(x)f_Y(z-x)dx$$ where the integral involves a CDF and a PDF. – Did Dec 31 '17 at 0:46
• @Did they do explicitly say probability density function even if they used the wrong notation for it. – spaceisdarkgreen Dec 31 '17 at 1:14

You are provided that the distributions are exponential: $f_X(x)= \mathsf e^{-x}\mathbf 1_{x\geqslant 0}\\ f_Y(y)= \mathsf e^{-y}\mathbf 1_{y\geqslant 0}$

Where the support is indicated using an indicator : $~\mathbf 1_{Q}=\begin{cases}1 & \textsf{if}& Q\textsf{ is true}\\0 &:&\textsf{otherwise}\end{cases}$

The convolution is thus $$\begin{split}f_Z(z) &= \int_{-\infty}^{\infty} f_X(x)\cdot f_Y(z-x)~\mathsf d x \\ &= \int_{-\infty}^{\infty} \mathsf e^{-x}\mathbf 1_{x\geqslant 0}\cdot \mathsf e^{-(z-x)}\mathbf 1_{(z-x)\geqslant 0}~\mathsf d x\\ &= \int_{-\infty}^{\infty} \mathsf e^{-z+x-x}\mathbf 1_{0\leqslant x}\mathbf 1_{x\leqslant z}~\mathsf d x \\ & = \mathsf e^{-z}\mathbf 1_{0\leqslant z}\cdot\int_0^z\mathsf d x \\ & = z\,\mathsf e^{-z}\mathbf 1_{z\leqslant 0} \end{split}$$

In short: always be careful about the support.

• Thank your for your help! – Eduard6421 Dec 31 '17 at 14:19

First, the support of the exponential distribution is $x>0$ so you need to account for when $z-x$ goes negative and the second factor goes to zero by only integrating from $0$ to $z$ rather than from $0$ to $\infty.$

Second, you made a sign error and the remaining exponential factor should be $e^{-z}.$ So you should get $ze^{-z}$ for the final answer.

• I corrected the mistake of $e^{-z}$, but i still do not see how to get $ze^{-z}$ as final answer? – Eduard6421 Dec 30 '17 at 23:51
• That's what my first paragraph was about. You integrate from $x=0$ to $z.$ You're integrating over $x,$ not $z$ so the $e^{-z}$ just comes out of the integral, if that's what is confusing you. – spaceisdarkgreen Dec 31 '17 at 1:16
• Thank you for your help! – Eduard6421 Dec 31 '17 at 14:19