# Homework Help. Finding the PDF of a new random variable.

$f_{XY}(xy) = \begin{cases} 2e^{-x - 2y}, & \text{if$x>0$and$y>0$} \\ 0, & \text{otherwise} \\ \end{cases}$

a new random variable Z is defined as $Z = X + Y$. Find the Probability Density Function of Z.

I can solve this by using the Jacobian method. But I want to know how to solve this using the basic definition based method. I began as $F_Z{z} = P(Z \le z)$. Can you please explain how to continue?

Thank you very much.

-
Hint $P(Z\le z)=\int P(X\le z-y \cap Y=y)dy$. –  awllower Jun 1 '13 at 6:31
@awllower Can you please explain more...? I didn't get it. –  PasanW Jun 1 '13 at 6:39
Sorry, my answer does not correspond well to the comment. Hope you can take it from here. :) –  awllower Jun 1 '13 at 6:55

Since $X>0$ and $Y>0$ a.s. Then $Z=X+Y>0$ a.s. Therefore $$F_Z(z)=\int\int_{A_z}2e^{-x-2y}dxdy$$ where $A_z=\{(x,y): z>0, x>0,y>0,x+y\le z\}$. On other words $A_z=\{(x,y): 0<x<z; 0<y<z-x\}$. Now we have $$F_Z(z)=\int\int_{A_z}2e^{-x-2y}dxdy\int_0^z\left[\int_0^{z-x}2e^{-x-2y}dy\right]dx$$ $$=2\int_0^ze^{-x}\left[\int_0^{z-x}e^{-2y}dy\right]dx=2\int_0^ze^{-x}\left[-\frac{1}{2}e^{-2y}|_0^{z-x}\right]dx$$ $$=-\int_0^ze^{-x}\left[e^{-2(z-x)}-1\right]dx=-\int_0^z(e^{-2z+x}-e^{-x})dx$$ $$=-e^{-2z}\int_0^ze^xdx+\int_0^ze^{-x}dx=-e^{-2z}(e^z-1)-(e^{-z}-1)$$ $$=e^{-2z}-2e^{-z}+1=(1-e^{-z})^2, \ \ z>0.$$

-

Let $A_z=\{(x,y)|x+y\le z\}$.
Then $$F_Z(z)=\iint\limits_{A_Z}f(x,y)dxdy=\int_{-\infty}^{\infty}\int_{-\infty}^{z-x}f(x,y)dydx\overset{y=v-x}{=}\int_{-\infty}^{\infty}\int_{-\infty}^{z}f(x,v-x)dvdx$$ $$=\int_{-\infty}^{z}\int_{-\infty}^{\infty}f(x,v-x)dxdv.$$
So the density should be $\int_{-\infty}^{\infty}f(x,z-x)dx$, as seen by differentiating the integral.
Any error should be pointed out, and every comment is welcomed. Thanks in advance.

P.S. Notice that, in integrating, we should stay in the region where both $x$ and $z-x$ are positive, in accordance with the definition of $f$. Thanks go to Abhra Abir Kundu for pointing this out.

-
If demanded, I could integrate it out explicitly. –  awllower Jun 1 '13 at 6:54
Here $\int_{-\infty}^{\infty}f(x,v-x)dx=\int_{0}^{v}f(x,v-x)dx$. As the random variable $X,Y$ are non negative. –  Abhra Abir Kundu Jun 1 '13 at 7:28
Yes, but I think it should be left completed by OP, as it depends uopn the behaviour of $f$. Regards. –  awllower Jun 1 '13 at 7:36
Ofcourse it depends upon the behaviour of $f$. I just commented so that OP doesnot the make the mistake of integrating the function over the whole real line with the value $(2e^{-x-2y})$.(I personally have made this mistake several times :P) –  Abhra Abir Kundu Jun 1 '13 at 7:44
I see. Thanks for pointing it out. :) –  awllower Jun 1 '13 at 7:45