# Transformation of random variables

What is the probability distribution function of the variable $y$ given by $$y=\frac{x_1}{x_1-x_2},\quad \: x_i\ge 0,$$

given that $x_1$ and $x_2$ are independent and identically distributed and $$x_i = c+z_i,\quad i=1,2$$ where $c$ is a real nonnegative constant and $z_i\sim\chi^2_\nu$.

I am afraid there is no simple answer to this and that this distribution is going to look a bit 'ugly'. What you could do is

1. Calculate the distribution of the difference $z_1-z_2$ using a convolution.
2. Calculate the distribution of the sum $z_1+c$ using a change of variable.
3. Calculate the distribution of the ratio $\dfrac{z_1+c}{z_1-z_2}$.

You can take a look at this R code to figure out how the density looks like.

z1 = rchisq(10000,10)
z2 = rchisq(10000,10)
c = 10
y = (z1+c)/(z1-z2)
hist(y)
plot(density(y))


Best wishes.

• Let me just add that Chapter I of An Intermediate Course in Probability by Allan Gut is a great reference in case you feel unsure about how to perform steps 1 and 3. – MånsT Mar 13 '12 at 10:05