Density and distribution functions I have the following problem for class:
$Y_1$ and $Y_2$ have joint continuous density $
   f(x) = \left\{
     \begin{array}{lr}
       2e^{-(y_1+y_2)} & 0 < y_1 < y_2\\
       0 & elsewhere
     \end{array}
   \right.
$
a. Determine the density for $U = Y_1 + Y_2$. Include a description of the interval of values for which the density is positive.
b. Determine the distribution function for $W=Y_2-Y_1$. Include a description of the interval of values for which the d.f. $F_w(w)$ satisfies $0 < F_w(w) < 1$.
Completely lost on this and need a help getting started. As far as I know, you would start by making a graph and find a shaded region where this is satisfied. So I made a graph that looks like this: 

But then I have a shaded region that would result in the following integral: 
$\int_{Y_1=0}^{?} \int_{Y_2=0}^{Y_1+Y_2}2e^{-(y_1+y_2)}dY_2dY_1$ 
 A: You have done most of the work by producing the diagram.
To find the cdf $F_U(u)$ of $U$ for $u\ge 0$, we integrate the joint density over the shaded region you identified. Then we differentiate to find the density function of $U$. 
Note that the line $y_1+y_2=u$ that you drew meets $y_1=y_2$ at $(u/2,u/2)$. 
We have a choice bout whether to integrate first with respect to $y_1$ or with respect to $y_2$. Because of the shape of the shaded region, integrating first with respect to $y_1$ involves breaking up into two parts, $y_1=0$ to $u/2$, and $y_1=u/2$ to $y_1=u$. So we will integrate first with respect to $y_2$, although that really does not make things much easier.
Note that $y_2$ goes from $y_1$ to $u-y_1$, and then $y_1$ goes from $0$ to $u/2$. We get
$$\int_{y_1=0}^{u/2}\left(\int_{y_2=y_1}^{u-y_1} 2e^{-(y_1+y_2)}\,dy_2\right)dy_1.$$
For the cdf of $W$, a new diagram is needed, with the line $y_2-y_1=w$ replacing the line $y_1+y_2=u$. 
A: Define the following variables
\begin{equation}
u = y_1 + y_2 \\
v = y_1
\end{equation}
The jacobian for this transformation is 
\begin{equation}
J = \left[\frac{\partial u}{\partial y_1}\hspace{5pt}\frac{\partial u}{\partial y_2}; \frac{\partial v}{\partial y_1}\hspace{5pt}\frac{\partial v}{\partial y_2}\right]
\end{equation}
Assuming the joint density function of $y_1$ and $y_2$ is $f_{Y_1,Y_2}\left(y1,y2\right)$, the density function of $u$ is obtained as
\begin{equation}
p_U\left(u\right) = \int_0^{\infty}\left|J\right|^{-1}f_{Y_1,Y_2}\left(v,u-v\right)dv
\end{equation}
In a similar way, you can find the distribution of $y_1-y_2$.
A: I would start by changing variables to two other orthogonal variables with a transformation whose Jacobian is 1, namely
$$v_1 = \frac{y_1 + y_2}{\sqrt{2}} \\ v_2 = \frac{y_2 - y_1}{\sqrt{2}}
$$
Then since $dy_1dy_2 = dv_1 dv_2 $ the density becomes
$$
f(v_1,v_2) = 
\left\{
\begin{array}{cl}
2e^{-v_1} & v_1 > v_2 > 0 \\
0 & \text{otherwise}
\end{array}
\right.
$$
Then you can see that for a given value of $v_1$ you have $v_1$ length in the $v_2$ direction available, so 
$$f(V_1) = 2v_1e^{-v_1/2}$$
Finally, transforming to $u = \sqrt{2}v_1$ is easy.
The same transformation is useful for part b.
