Finding correct bounds for integral to evaluate probability I have a bivariate random variable $(X,Y)$ with density given by $f(x,y)=e^{-x}$, $0<y<x$.
I need to evaluate $P(X<2-Y)$, but I am having trouble finding the correct bounds on which to evaluate the integral required to find the answer.
The solution is given as 
$$P(X<2-Y)=\int_0^1 \int_0^x e^{-x} \, dydx + \int_1^2 \int_0^{2-x} e^{-x} \, dydx$$
but I cannot see why the region of integration needs to be split up like it is.
I am not sure what I should graph to be able to see that these bounds are correct. Any hints as to how I should proceed are appreciated?
 A: First let us identify the region where the joint density function "lives." We are told that $0\lt y\lt x$. Draw the line $y=x$. The density function lives in the part of the first quadrant that is below the line $y=x$.
Now let us look at the condition $X\lt 2-Y$, which I prefer to rewrite as $X+Y\lt 2$. Draw the line $x+y=2$. We want to find the probability that the pair $(X,Y)$ ends up below the line.
Now look at the region $K$ which is in the first quadrant, below the line $y=x$, and below the line $x+y=2$. This is a triangle with corners $(0,0)$, $(0,2)$, and $(1,1)$.  We are integrating $e^{-x}$ over the triangle.

Suppose that we decide to integrate first with respect to $x$, and then with respect to $y$. If $0\lt x\lt 1$, then $y$ goes from $0$ to $x$, because when we hit the line $y=x$, we leave $K$.  But from $x=1$ to $x=2$, we start at $y=0$, and as we go up we leave $K$ when we hit the bounding line $x+y=2$.  That analysis will give the solution that you quoted.
But note that we could first integrate with respect to $x$. For any $y$ between $0$ and $1$, we enter the region $K$ at $x=y$, and leave it at $x+y=2$, that is, $x=2-y$. So an alternative way to compute the probability is as
$$\int_{y=0}^1\left(\int_{x=y}^{2-y} e^{-x}\,dx                 \right)\,dy.$$
As a bonus, the mechanical details of the integration are easier!
