3
$\begingroup$

This is from the book Python for Probability, Statistics, and Machine Learning. It's a good book for people that already have a math background, I believe. Anyway, there is something I don't understand and I hope you guys could give me a hand.

Given $Z = \frac{X}{Y-X}$, where $Y$ and $X$ are uniformly distributed in $[0,1]$. I would like to obtain the density $f_Z(z)$.

That is, $$P(Z<z) = \iint B_1 dX dY$$ with $$ B_1 = \{0<Z<z\}$$

From here it is true that $Y>X$ and that $Y>X(1/z+1)$, but the author then states, and I quote:

Putting this together gives $$A_1 = \{\mbox{max}(X,X(1/z+1)) < Y < 1 \}$$

Integrating over $Y$ as follows

$$\int_0^1 \{\mbox{max}\left(X,X(1/z+1)\right) < Y < 1 \} dY = \frac{z-X-Xz}{z} \mbox{ where } z> \frac{X}{1-X}$$

I get that $\frac{z-X-Xz}{z}$ is a fancy way of writing $1 - X(1/z+1)$, but I don't know how to obtain that result and particularly how to integrate over this function $\mbox{max\{\}}$. Plus I don't get the condition of $z$

How would you explain this? I hope this is the place for such a question. Thanks

$\endgroup$
4
  • 3
    $\begingroup$ Draw the picture! For a given $z\gt 0$, you are merely finding the area of the region $0\le X \le 1$, $0\le Y\le 1$, and $(1+z)X \le zY$. This is the intersection of five half-planes and indeed is a triangle. With the picture in front of you, it should be easy to relate the evaluation of the integral to portions of the picture. $\endgroup$
    – whuber
    Commented Oct 23, 2017 at 16:29
  • 1
    $\begingroup$ Thanks for your help, but I'm lost plotting those five half planes. Do you mind writing them here? How do you get them and how are they related to the $\mbox{max}()$ function? Thanks $\endgroup$
    – bluesmonk
    Commented Oct 23, 2017 at 17:41
  • $\begingroup$ @bluesmonk draw the line $y = x (1/z+1)$ then shade on top of it (the half-plane above it). This line is of the form $y=mx+b$. $y$ is linear in $x$. $\endgroup$
    – Taylor
    Commented Feb 21, 2018 at 23:10
  • 2
    $\begingroup$ Also, $z$ can be negative as it is possible that $Y < X$. $\endgroup$
    – Taylor
    Commented Feb 21, 2018 at 23:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.