I just want someone to check that my proceedings are correct.
So I'm given that $f(x,y) = 2e^{-x^2}$ when $0 \leq y \leq x$, $0 \leq x < \infty$. And I'm trying to find the Cumulative Distribution of $W = X - Y$.
Here's what I've done so far:
$w = x -y \geq x - x = 0$ so $w \geq 0$. So $F_W(w) = 0$ for $w < 0$.
So for when $w \geq 0$ we know that $x = w+y \geq w$ so we do as follows: $$ \int_{w}^{\infty} \left( \int_{0}^{w-x} 2e^{-x^2}dy \right) dx $$
After that, we just do the double integration. Is this correct? Can you spot a mistake or give some tips?
The integration range is $\{(x,y):~ 0\leqslant x-y\leqslant w~,~ 0\leqslant y\leqslant x~\}$.
Which can be rearranged to: $\{(x,y):~ 0\leqslant x ~,~ x-w\leqslant y\leqslant x~\}$
That is: the support for $X$, and for $Y$ given $X$.
Thus giving the double integral:
$$\mathsf P(X-Y\leq w) = \int_0^\infty\int_{x-w}^x f(x,y)\operatorname d y\operatorname d x$$