How to compute transfomed pdf under non-injective function

426 Views Asked by At

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.

1

There are 1 best solutions below

0
On BEST ANSWER

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.