# convolution of exponential distribution and uniform distribution

Given $X$ an exponentially distributed random variable with parameter $\lambda$ and $Y$ a uniformly distributed random variable between $-C$ and $C$. $X$ and $Y$ are independent. I'm supposed to calculate the distribution of $X + Y$ using convolution.

Does anyone have any tips on how to do this?

I understand that the convolution is represented by $$\int_{-\infty}^{+\infty} f_1(x) \cdot f_2(z-x)dx\tag {1}$$

and so given $$f_1(x) = \begin{cases} \lambda e^{-\lambda x} &, x\ge 0\\ 0 &, x < 0 \end{cases}$$

and $$f_2(y) = \begin{cases} \frac{1}{2C} &, y \in [-C,C]\\ 0 & , \text{otherwise}\end{cases}$$

(1) becomes: $$\int_{-\infty}^{+\infty} \lambda e^{-\lambda x}\cdot \frac{1}{2C} dx$$

but I don't know how to procede from here. How do I choose which intervals of $z$ to integrate?

## 2 Answers

Your final integral is incorrect; where is $z$ - it needs to be in your integral limits?

It is probably easier to calculate

$$\int_{-\infty}^{+\infty}f_1(z-x)\cdot f_2(x)dx= \begin{cases} \int_{-C}^{+C}\lambda e^{-\lambda (z-x)}\cdot \frac{1}{2C} &, z \ge x\\ 0 &, z\lt x \end{cases}$$

On second thoughts - your way is better

\begin{align}\int_{-\infty}^{+\infty}f_1(x)\cdot f_2(z-x)dx&= \begin{cases} \int_{z+C}^{z-C}\lambda e^{-\lambda x}\cdot \frac{1}{2C} dx &,z \ge C \\ \int_{z+C}^0\lambda e^{-\lambda x}\cdot \frac{1}{2C} dx &,C \ge z \ge -C \\ 0 &,z\lt -C \end{cases} \end{align}

• I don't understand how it is incorrect. The way I understand it, both are correct. I decided to substitute y with z-x where as you decided to substitute x with z-y. – Ben May 30 '13 at 0:58
• Super, that makes sense! Thanks. Any reason why you swapped the bounds of integration (z+c to z-c instead of the other way around)? – Ben May 30 '13 at 1:55
• Because we are using $z-x$ and substituting $-C$ and $C$ respectively – Dale M May 30 '13 at 6:04
• How come the two approaches are so different? In the first case we have a function defined by two cases, in the second we have one defined by three cases... Shouldn't the graphs look identical? – Ben May 30 '13 at 6:58
• The first function compares $z$ to $x$ - the second compares $z$ to $C$. You will need to eliminate $x$ in the first whereas the integral will do is automatically in the second. If you work each one through you will get the same result. – Dale M May 31 '13 at 6:29

Define $Z=X+Y$. We need to find the CDF/PDF of $Z$. By definition, we have:

$P(Z\le z) = P(X+Y\le z)=\int_{-\infty}^{+ \infty}P(X \le z-y) f(y) dy$

Now, for $z-y < 0$

$$P(X \le z-y) = 0$$

and for $z-y \ge 0$

$$P(X \le z-y) = 1-e^{-\lambda(z-y)}$$

and $f(y) = \frac{1}{2C}$

Therefore, the above integral reduces to:

$P(Z\le z) = \int_{-\infty}^{+ z} (1-e^{-\lambda(z-y)}) \frac{1}{2C} dy$

Therefore, the pdf of $Z$ is given by:

$$\int_{-\infty}^{+ z} \frac{\lambda e^{-\lambda(z-y)}}{2C} dy$$