# Sum of two random variables. Limits of integration

Let $X$ have pdf $$f_X(x)=e^{-x} \qquad \text{ for } x \ge 0$$ and $Y$ have $$f_Y(y)=1 \qquad \text{ for } 0\le y \leq 1$$
$X, Y$ both independent. What is the pdf for $Z=X+Y$?

Using convolution formula I get $$f_Z(z)=\int_{-\infty}^{\infty}f_X(z-y)f_Y(y)dy$$

How do I figure out my limits of integration? Since $f_X(x)$ is from $0\leq x \lt \infty$ so should $f_X(z-y)$ be. That makes want to integrate from $0$ to $z$, which is apparently wrong.

• In your integral, as $y$ sweeps from $-\infty$ to $\infty$, the integrand must be $0$ except when $y \in [0,1]$, right? So straightaway, the limits of the integral can be reduced. Next, let's pick a numerical value (say $3$) for $z$. As $y$ sweeps from $0$ to $1$, is $f_X(3-y)$ always nonzero? and if so, what is $f_X(3-y)$? What if we had chosen $z=5$ instead? or $z=9.382$? Just when you were ready to jump to conclusions, I suggest: try it for $z = 0.5$. – Dilip Sarwate Nov 3 '14 at 23:16