Probability density function of sum of uniform random variables

probabilityprobability distributionsstatistics

Let $X$ and $Y$ be independent random variables with density functions

$f_X(a)
\begin{cases}
1\over2 & -1\le a\le1 \\
0 & \text{otherwise}
\end{cases}$

$f_Y(a)
\begin{cases}
1\over2 & 3\le a\le5 \\
0 & \text{otherwise}
\end{cases}$

Find the probability density function of $X + Y$

I have been trying to do this without convolution, but with using the standard double integral method of finding the CDF and then the PDF (as opposed to using a purely geometrical method) and I have been successful in the case of $2 \le a \le 4$ by using an integral of ${1\over 4}\int_3^a \int_{-1}^{a-y}dxdy$

However I have been having trouble in the other case of $4 \le a \le 6$.
My attempt was this:

$${1\over 4}\int_3^5 \int_{-1}^{min \{1, a-y\}}\ dx \ dy$$

$${1\over 4}\left (\int_3^5 ({min \{1, a-y\}} +1) \ dy \right)$$

$${1\over 4}\left (\int_3^5 ({min \{1, a-y\}}\ dy+ \int_3^5 1\ dy \right)$$

At this point I said that since the minimum function depends on whether $y>a-1$ or $y<a-1$, therefore there are two cases and thus

$${1\over 4}\left (\int_3^{a-1}1 \ dy +\int_{a-1}^{5} \ y \ dy+ \int_3^5 1\ dy \right)$$

$${1\over 4}\left (a-4-\dfrac{a^2-2a-24}{2}+ 2\right)$$

Taking the derivative of this CDF yields ${1\over2} – {a\over4}$, whereas the true solution is ${3\over2} – {a\over4}$. Where am I going wrong?

Best Answer

In $\int_3^5 {\min \{1, a-y\}}\ dy$, the integrand should equal $a-y$ when $a-y < 1$, i.e. when $y > a-1$. So when you split it into two, it should read $$\int_3^{a-1} 1\,dy + \int_{a-1}^5 (a-y)\,dy.$$ In your work, you have $y$ in the second integral instead of $a-y$. Fixing this gives the expected answer.

Related Question