[Math] Need help finding joint distribution of uniform and exponential

density functionprobabilityprobability distributionsstatistics

Let X be an exponential random variable with parameter λ and Y be a
uniform random variable on [0,1] independent of X. Find the probability
density function of X + Y.

Now I have computed this integral for the last hour or more and at this point I really would like to now if I at least just set up the integral correctly. So here is my solution:

$$P(X+Y\le a)=\int_0^{a-1}\int_0^1dydx+\int_{a-1}^a\int_0^{a-x}\lambda e^{-\lambda x}dydx \space \space \text{for} \space \space a\ge 1$$ and for $0 \le a \le 1$ $$(f_x*f_y)(a)=f_{X+Y}(a)=\int_0^a \lambda e^{-\lambda x}dx=1-e^{-\lambda a}.$$

The solution is $$ f_{X+Y}(a)=
\begin{cases}
1-e^{-\lambda a} & 0 \le a \le 1 \\
e^{-\lambda a}(e^{\lambda}-1) & a \ge 1
\end{cases} $$

Best Answer

We calculate the cdf, dealing mainly with the case $a\ge 1$.

Draw the line $y=1$. The joint density function lives in the part of the first quadrant that is below the line $y=1$.

Draw the line $x+y=a$. Note that the geometry is a little different if $0\lt a\le 1$ than if $a\gt 1$, so making two diagrams is helpful.

To find the probability that $X+Y\le a$ we integrate $\lambda e^{-\lambda x}$ over the first quadrant region that is below $y=1$ and below $x+y=a$. It is convenient to integrate first with respect to $x$. We get $$F_{X+Y}(a)=\int_{y=0}^1 \left(\int_{x=0}^{a-y}\lambda e^{-\lambda x}\,dx\right)\,dy.$$ The inner integral is $1-e^{-\lambda(a-y)}$, that is, $1-e^{-\lambda a}e^{\lambda y}$.

Now integrating from $0$ to $1$ we get $$F_{X+Y}(a)=1-\frac{e^{-\lambda a}}{\lambda}(e^{\lambda}-1).$$

For the density function, differentiate. We get $$f_{X+Y}(a)=e^{-\lambda a}(e^{\lambda}-1).$$

The calculation for $0\lt a\lt 1$ is similar, except that in this case $$F_{X+Y}(a)=\int_{y=0}^a \left(\int_{x=0}^{a-y}\lambda e^{-\lambda x}\,dx\right)\,dy, $$ so $F_{X+Y}(a)=a-\frac{e^{-\lambda a}}{\lambda}(e^{\lambda a}-1)$, and now for the density we can differentiate.

Remark: If we just want the density, the second integration is in each case unnecessary if we know how to differentiate under the integral sign.