# Finding the Probability Density Function of a random variable

$$X$$ and $$Y$$ are independent random variables whose marginal PDF's are uniform on $$[0,5],$$ and $$Z=X+Y$$. I want to find the Probability Density Function.

To start I assume I need to find the cumulative density function. I tried to follow a similar problem here, but was unable to adapt it to my own problem.

• The pdf for $Z$ is the convolution of your two pdfs. If you take the convolution of two constants ($=1/5$) you should end up with a triangle-shaped pdf. Commented Apr 8, 2019 at 0:01
• How do I take a convolution in this context? Commented Apr 8, 2019 at 0:02
• What do you know and not know about the definition of convolution. In your case it is very straightforward. Commented Apr 8, 2019 at 0:25
• All I know is that I need to take $f_Z(z)=\int_{-\infty}^\infty f_X(x)f_Y(z-x)\,dx.$, but beyond that it is not straightforward for me. Commented Apr 8, 2019 at 0:32
• Observe that $f_X=1/5$ in $[0,5]$ and zero elsewhere. Same for $Y$. If you fix some $z$, your integral only extends to those $x$ such that $x\in[0,5]$ and $z-x\in[0,5]$. Look at all possible cases for the intersection. Commented Apr 8, 2019 at 0:54

If you have not learned about convolution products, just find the CDF first. $$P(X+Y\leq t)=\int_0^{t-u}\frac{1}{5}(\int_0^{u} \frac{1}{5}du)dx$$ for $$0\leq t \leq 5$$. It is actually better to draw the square $$[0,5]^2$$ and evaluate the area geometrically.
The CDF should be $$\frac{1}{50}t^2, (0\leq t\leq 5)\\ 1-\frac{1}{50}(10-t)^2, (5\leq t\leq 10)\\ 0, (\text{otherwise})$$
If you differentiate this you get the PDF $$\frac{1}{25}t, (0\leq t\leq 5)\\ \frac{1}{25}(10-t), (5\leq t\leq 10)\\ 0, (\text{otherwise})$$ which is a "triangle" if you plot it.
• Thank you! One question, should there be a minus sign in front of $\frac{1}{25}(10-5)$? Commented Apr 8, 2019 at 1:34