# Finding the pdf of $Z=X+Y$ given the pdfs of $X$ and $Y$

Given that $X ,Y$ has the following joint pdf: $$f (x, y) = x + y , \qquad 0 \leq x \leq 1, \quad 0\leq y \leq 1$$ Let $Z = X+Y$. I need help in finding the pdf $f(z)$ of $Z$.

EDIT [by Srivatsan]: Changed the definition of $Z$ from $Z = x+y$ to $Z = X+Y$ in the title and the post.

-
You must have meant $Z=X+Y$ rather than $Z=x+y$. – Michael Hardy Dec 6 '11 at 20:18
Hint: Let $0 \leq \alpha \leq 1$ be a fixed number. Compute $P\{Z \leq \alpha\}$. Repeat for $P\{Z \leq \beta\}$ where $1 \leq \beta \leq 2$. You will need to do double integrals to find these probabilities. Draw pictures to help you figure out the limits of the double integrals. Then find $f_Z(z)$ by differentiating $F_Z(z)$. – Dilip Sarwate Dec 6 '11 at 20:20

Notice that the joint pdf corresponds to a measure (using Iverson bracket): $$\mathrm{d} F_{X,Y}(x,y) = (x+y) [ 0 \leq x \leq 1] [0 \leq y \leq 1] \mathrm{d} x \mathrm{d} y$$ Let's perform a change of variables $z=x+y$ and $w = \frac{y-x}{2}$. The corresponding Jacobian equals 1, and we get: $$\mathrm{d} F_{X,Y}(x(z,w),y(z,w)) = z \left[ 0 \leq z \leq 2, |w| \leq \min\left( \frac{z}{2}, 1-\frac{z}{2}\right) \right] \mathrm{d} z \mathrm{d} w$$ It is now easy to integrate over $w$, giving you the marginal measure: $$\mathrm{d} F_Z(z) = z \min\left( z, 2-z \right) \left[ 0 \leq z \leq 2 \right] \,\mathrm{d} z = f_Z(z) \mathrm{d} z$$