[Math] Sum of Two Continuous Random Variables

actuarial-sciencemultivariable-calculusprobabilityprobability theory

Consider two independent random variables $X$ and $Y$. Let $$f_X(x) =
\begin{cases}
1 − x/2, & \text{if $0\le x\le 2$} \\
0, & \text{otherwise}
\end{cases}$$.Let $$f_Y(y) =
\begin{cases}
2-2y, & \text{if $0\le y\le 1$} \\
0, & \text{otherwise}
\end{cases}$$. Find the probability density function of $X + Y$.

Can anyone show me a step by step solution to this problem?

I've been applying this theorem to solve the problem with limited success enter image description here

Best Answer

Let $Z=X+Y$. We know $0\leq Z\leq 3$ but for the density of $Z$ we have three cases to consider due to the ranges of $X$ and $Y$.

If $0\leq z\leq 1$:

\begin{eqnarray*} f_Z(z) &=& \int_{x=0}^{z} f_X(x)f_Y(z-x)\;dx \\ &=& \int_{x=0}^{z} (1-x/2)(2-2y)\;dx \\ &=& \left[ 2x-2zx+zx^2/2+x^2/2-x^3/3 \right]_{x=0}^{z} \\ &=& 2z - \dfrac{3}{2}z^2 + \dfrac{1}{6}z^3. \end{eqnarray*}

If $1\lt z\leq 2$:

\begin{eqnarray*} f_Z(z) &=& \int_{x=z-1}^{z} f_X(x)f_Y(z-x)\;dx \\ &=& \int_{x=z-1}^{z} (1-x/2)(2-2y)\;dx \\ &=& \left[ 2x-2zx+zx^2/2+x^2/2-x^3/3 \right]_{x=z-1}^{z} \\ &=& \dfrac{7}{6} - \dfrac{1}{2}z. \end{eqnarray*}

If $2\lt z\leq 3$:

\begin{eqnarray*} f_Z(z) &=& \int_{x=z-1}^{2} f_X(x)f_Y(z-x)\;dx \\ &=& \int_{x=z-1}^{2} (1-x/2)(2-2y)\;dx \\ &=& \left[ 2x-2zx+zx^2/2+x^2/2-x^3/3 \right]_{x=z-1}^{2} \\ &=& \dfrac{9}{2} - \dfrac{9}{2}z + \dfrac{3}{2}z^2 - \dfrac{1}{6}z^3. \end{eqnarray*}

Related Question