# Finding the Pdf of two RVs

I have the following density function

$$$$f_{X, Y}\left(x,y\right)=\:\frac{1}{x},\ \text{for} \ 0 \ \leq \ y \ \leq \ x \ \leq 1$$$$

I need to find the probability density function for $$$$Z = X+Y$$$$

Here is my works so far

$$$$f_{X}\left(x\right)=\:\int _0^x\frac{1}{x}dy\:=\:1\:\\f_{Y}\left(y\right)=\:\int _y^1\:\frac{1}{x}dx\:=\:-ln\left(y\right)\:$$$$ Now $$$${f_Z\left(z\right)=\:\int _{-\infty }^{\infty }\:f_Y\left(y\right)f_X\left(z-y\right)dy\:=\:\int _{-\infty \:}^{\infty \:}\:\left[-ln\left(y\right)\right]dy\:}$$$$ Which am stuck now on the limits of integration for the Z pdf. How do I find those please help.

• There are two basic techniques to tackle such integration problems. (1) Draw a picture of the domain of integration. (This domain is complicated, making the picture a useful tool.) (2) Make the density function explicit. This method usually uses the indicator function $\mathcal{I}_A(x,y),$ equal to $1$ when $(x,y)\in A$ and $0$ otherwise. Thus, one fully correct expression of the density is $$f_{X,Y}(x,y) = \frac{1}{x}\,\mathcal{I}_{0\le y}(x,y)\mathcal{I}_{y\le x}(x,y)\mathcal{I}_{x\le1}(x,y).$$ The rules of algebra here substitute for the geometric insight afforded by the picture.
– whuber
Commented Oct 29, 2019 at 13:39

In general, we have: $$f_Z(z)=\int_{-\infty}^\infty f_{XY}(w,z-w)dw$$ What you've written (the convolution formula) is true when $$X$$ and $$Y$$ are independent only, which enables you to factorize the above joint PDF.
Here, to take this integral, you need to plot the region of support, as well as $$x+y=z$$ line. Only then, it'll be obvious that we need to take this integral for $$0\leq z\leq 1$$ and $$1< z \leq 2$$ cases. $$0\leq z \leq 1\rightarrow f_Z(z)=\int_{z/2}^z\frac{1}{w}dw=\ln w\bigg\vert_{z/2}^z=\ln2$$ $$1
Edit: Region of support (RoS) is the region between the lines $$y=0,x=1,y=x$$. When you intersect $$x+y=z$$ line with RoS (draw it), if $$0\leq z\leq1$$, the intersection line segment will start at $$y=x$$ and end at $$y=0$$. The boundaries in the integral are the x coordinates of these points. When $$1, it'll again start at $$y=x$$ but end at $$x=1$$.
• @Raykh I've added some explanation. Also, keep in mind that $0\leq z\leq 2$. Commented Oct 29, 2019 at 6:01