# finding the distribution of two dimensional variable that is a function of two variables of a uniform distribution

I thought I understand the matter at hand but it seems I can't solve a basic exercise on the topic.

I've got a random variable $(X,Y)$ that has a uniform distribution over $D = \left\{(x,y) : 0\leq x\leq 1, x-1\leq y\leq 1-x \right\}$ and I am to find the distribution of $(Z,W) = ( X + |Y|, \frac{X}{X+|Y|} )$ . How should I compute it and what is the cumulative distribution function here?

As I understand it I have to compute an integral of my probability density function (which makes 1 here ) over a domain where both $x+|y|\geq z$ and $x/(x+|y|)\geq w$ are satisfied which I calculated to be $2*(\int_0^{z*w} \int_0^{x*( \frac{1}{w} - 1)} \! \, \mathrm{d} y \mathrm{d} x + \int_{z*w}^z \int_0^{-x+z} \! \, \! \, \mathrm{d} y \mathrm{d} x)$. This gave me $z^2*(1-w)$ for z $\in$ (0,1] and w $\in$ (0,1]. However according to answer sheet it should be $w*z^2$. Where is my thinking wrong? How should the matter be handled properly? Thanks in advance!

-

The joint distribution function of $(Z,W)$ is defined by $F(z,w)=\mathbb{P}(Z\leq z, W\leq w)$; you have the inequalities reversed. The answer is, in fact, $F(z,w)=z^2\,w$. As a sanity check if you plug in either $z=0$ or $w=0$ you ought to get zero, while if you plug in both $z=1$ and $w=1$ you ought to get one. Hmmm, seems OK.
To find $F(z,w)$ in your problem, it's not necessary to do any double integration. Draw a good picture and find the area of appropriate triangles.
All points in $D$ satisfy the condition $x-1\leq y\leq 1-x$, which implies $|y|\leq 1-x$ or $x+|y|\leq 1$. It will be really helpful to draw a picture. – Byron Schmuland Jun 27 '12 at 2:18