2

I have a two random variables $x,y$ which are both (independently) distributed accordingly to the triangular distribution $x,y \sim Tri(-1,1,0)$ where I used the definition from Wikipedia.

Now, I want to calculate the distribution of $z$, with $z = \sqrt{ x^2 + y^2 }$ which is unfortunately not injective on the domain of $x,y$. Therefore, I cant use the 'standard' way of computing the transformed pdf, right? But is there a differnt method? Unfortunately, converting the problem into polar coordinates doesn't seem to be very convenient.

bonanza
  • 441
  • I miss-read previously, thinking there are only finitely many pairs $(x,y)$ for every $z$, but there of course aren't. So instead, make it injective by instead of looking at $(x,y) \to z$, look at $(x,y) \to (z,u)$ where $u$ is chosen to make it injective... You don't need full polar coordinates, just a simple $u$ that preserves enough information. Then, transform the PDF, and then find the margin distribution of $z$, i.e. "integrate the $u$ away". – fgp Apr 02 '14 at 13:25
  • @fgp thanks for your reply. This sounds interesting. Can you provide some examples or more information on how to make this mapping injective? – bonanza Apr 02 '14 at 13:40
  • Well, $u = x$ will make the only unknown the sign of $y$, so you can e.g. use $u=x$ plus the law of total probability (i.e., split things up into the case $y < 0$ and $y \geq 0$). Maybe something else makes the various integrals easier to compute though - I don't know, I didn't try. You'll need to play around with this a bit... – fgp Apr 02 '14 at 13:49

1 Answers1

1

Here is a solution using automated tools ...

Given: random variables $(X,Y)$ have joint pdf $f(x,y)$:

  f = (1-Abs[x])(1-Abs[y]);     domain[f] = {{x,-1,1}, {y,-1,1}};

Here is a plot of the joint pdf:


(source: tri.org.au)

You seek the cdf of $Z = \sqrt{X^2+Y^2}$, namely $P(Z<z) = P(\sqrt{X^2+Y^2}<z)$:


(source: tri.org.au)

where Prob is the probability function from the mathStatica package for Mathematica.
All done.

The pdf is just the derivative of the cdf wrt $Z$, which yields the pdf as:

$$ \begin{array}{cc} 2 z ((z-4) z+\pi ) & 0<z\leq 1 \\ -2 z \left(z^2-4 \sqrt{z^2-1}+2 \tan ^{-1}\left(\sqrt{z^2-1}\right)-2 \csc ^{-1}(z)+2\right) & 1<z<\sqrt{2} \\ \end{array} $$

with domain of support on $(0,\sqrt{2})$.

Finally, here is plot of the pdf of $Z$ just derived (red dashed), and superimposed on top (in blue) is a Monte Carlo check (always a good idea to check one's work):


(source: tri.org.au)

Notes

  1. As disclosure, I should add that I am one of the authors of the software used above.
Glorfindel
  • 3,955
wolfies
  • 5,174