Finding pdf of function of random variables

127 Views Asked by At

Given the problem:

X and Y are independent and uniform in the interval (0,a). Find the p.d.f of $\frac{y}{x+y}$

Currently I have solved it such that

$$F_z(z) = P(Z \le z) = P\{\frac{Y}{X+Y} \le z \}$$ $$ = P\{\frac{X}{Y} \ge \frac{1}{z}-1\} = 1 - P\{\frac{X}{Y}\le\frac{1-z}{z}\}$$ $$= \begin{cases} \frac{1}{2}(\frac{z}{1-z}), & 0 \le z \le 1/2 \\ 1-\frac{1}{2}(\frac{1-z}{z}), & 1/2 \le z \le 1 \end{cases}$$

However, the answer to the problem comes out to:

$$ f_z(z) = \begin{cases} \frac{1}{2(1-z)^2}, & 0 \le z \le 1/2 \\ \frac{1}{2z^2}, & 1/2 \le z \le 1 \end{cases}$$

I can't figure out what I need to do to get to that last step to get the given answer. It's obviously more than some simple algebra with my answer. Would someone be able to help? Thank you so much for your help in advanced!