Distribution of ratio between two independent uniform random variables Supppse $X$ and $Y$ are standard uniformly distributed in $[0, 1]$, and they are independent, what is the PDF of $Z = Y / X$? 
The answer from some probability theory textbook is
$$
f_Z(z) = 
\begin{cases}
1/2, & \text{if } 0 \le z \le 1 \\
1/(2z^2), & \text{if } z > 1 \\ 
0, & \text{otherwise}.
\end{cases}
$$
I am wondering, by symmetry, shouldn't $f_Z(1/2) = f_Z(2)$? This is not the case according to the PDF above. 
 A: If you think geometrically...
In the $X$-$Y$ plane, curves of constant $Z = Y/X$ are lines through the origin.  ($Y/X$ is the slope.)  One can read off the value of $Z$ from a line through the origin by finding its intersection with the line $X=1$.  (If you've ever studied projective space: here $X$ is the homogenizing variable, so looking at values on the slice $X=1$ is a relatively natural thing to do.)
Consider a small interval of $Z$s, $(a,b)$.  This interval can also be discussed on the line $X=1$ as the line segment from $(1,a)$ to $(1,b)$.  The set of lines through the origin passing through this interval forms a solid triangle in the square $(X,Y) \in U = [0,1]\times[0,1]$, which is the region we're actually interested in.  If $0 \leq a < b \leq 1$, then the area of the triangle is $\frac{1}{2}(1-0)(b-a)$, so keeping the length of the interval constant and sliding it up and down the line $X=1$ (but not past $0$ or $1$), the area is the same, so the probability of picking an $(X,Y)$ in the triangle is constant, so the probability of picking a $Z$ in the interval is constant.
However, for $b>1$, the boundary of the region $U$ turns away from the line $X = 1$ and the triangle is truncated.  If $1 \leq a < b$, the projections down lines through the origin from $(1,a)$ and $(1,b)$ to the upper boundary of $U$ are to the points $(1/a,1)$ and $(1/b,1)$.  The resulting area of the triangle is $\frac{1}{2}(\frac{1}{a} - \frac{1}{b})(1-0)$.  From this we see the area is not uniform and as we slide $(a,b)$ further and further to the right, the probability of selecting a point in the triangle decreases to zero.
Then the same algebra demonstrated in other answers finishes the problem.  In particular, returning to the OP's last question, $f_Z(1/2)$ corresponds to a line that reaches $X=1$, but $f_Z(2)$ does not, so the desired symmetry does not hold.
A: Just for the record, my intuition was totally wrong. We are talking about density, not probability. The right logic is to check that
$$
\int_1^k f_Z(z) dz = \int_{1/k}^1 f_Z(z) = \frac{1}{2}(1 - \frac{1}{k})
$$, 
and this is indeed the case. 
A: The right logic is that with independent $X, Y \sim U(0,1)$, 
$Z=\frac YX$ and
$Z^{-1} =\frac XY$ have the same distribution and so for $0 < z < 1$
\begin{align}
P\left\{\frac YX \leq z\right\} &= P\left\{\frac XY \leq z\right\}\\
&= P\left\{\frac YX \geq \frac 1z \right\}\\
\left.\left.F_{Z}\right(z\right) &= 1 - F_{Z}\left(\frac 1z\right)
\end{align}
where the equation with CDFs uses the fact that $\frac YX$ is a
continuous random variable and so $P\{Z \geq a\} = P\{Z > a\}
= 1-F_Z(a)$. Hence the pdf of $Z$ satisfies
$$f_Z(z) = z^{-2}f_Z(z^{-1}), \quad 0 < z < 1.$$
Thus $f_Z(\frac 12) = 4f_Z(2)$, and not $f_Z(\frac 12) = f_Z(2)$
as you thought it should be.
A: This distribution is symmetric--if you look at it the right way.
The symmetry you have (correctly) observed is that $Y/X$ and $X/Y = 1/(Y/X)$ must be identically distributed.  When working with ratios and powers, you are really working within the multiplicative group of the positive real numbers.  The analog of the location invariant measure $d\lambda=dx$ on the additive real numbers $\mathbb{R}$ is the scale invariant measure $d\mu = dx/x$ on the multiplicative group $\mathbb{R}^{*}$ of positive real numbers.  It has these desirable properties:


*

*$d\mu$ is invariant under the transformation $x\to ax$ for any positive constant $a$: $$d\mu(ax) = \frac{d(ax)}{ax} = \frac{dx}{x} = d\mu.$$

*$d\mu$ is covariant under the transformation $x\to x^b$ for nonzero numbers $b$: $$d\mu(x^b) = \frac{d(x^b)}{x^b} = \frac{b x^{b-1} dx}{x^b} = b\frac{dx}{x} = b\, d\mu.$$

*$d\mu$ is transformed into $d\lambda$ via the exponential: $$d\mu(e^x) = \frac{de^x}{e^x} = \frac{e^x dx}{e^x} = dx = d\lambda.$$  Likewise, $d\lambda$ is transformed back to $d\mu$ via the logarithm.
(3) establishes an isomorphism between the measured groups $(\mathbb{R}, +, d\lambda)$ and $(\mathbb{R}^{*}, *, d\mu)$.  The reflection $x \to -x$ on the additive space corresponds to the inversion $x \to 1/x$ on the multiplicative space, because $e^{-x} = 1/e^x$.
Let's apply these observations by writing the probability element of $Z=Y/X$ in terms of $d\mu$ (understanding implicitly that $z \gt 0$) rather than $d\lambda$:
$$f_Z(z)\,dz = g_Z(z)\,d\mu = \frac{1}{2}\begin{cases}
1\,dz = z\, d\mu, & \text{if } 0 \le z \le 1 \\
\frac{1}{z^2}dz = \frac{1}{z}\, d\mu, & \text{if } z > 1. 
\end{cases}$$
That is, the PDF with respect to the invariant measure $d\mu$ is $g_Z(z)$, proportional to $z$ when $0\lt z \le 1$ and to $1/z$ when $1 \le z$, close to what you had hoped.

This is not a mere one-off trick.  Understanding the role of $d\mu$ makes many formulas look simpler and more natural.  For instance, the probability element of the Gamma function with parameter $k$, $x^{k-1}e^x\,dx$ becomes $x^k e^x d\mu$.  It's easier to work with $d\mu$ than with $d\lambda$ when transforming $x$ by rescaling, taking powers, or exponentiating.
The idea of an invariant measure on a group is far more general, too, and has applications in that area of statistics where problems exhibit some invariance under groups of transformations (such as changes of units of measure, rotations in higher dimensions, and so on).
A: Yea the link Distribution of a ratio of uniforms: What is wrong? provides CDF of $Z=Y/X$. 
The PDF here is just derivative of the CDF. So the formula is correct. I think your problem lies in the assumption that you think Z is "symmetric" around 1. However this is not true. Intuitively Z should be a skewed distribution, for example it is useful to think when Y is a fixed number between $(0,1)$ and X is a number close to 0, thus the ratio would be going to infinity. So the symmetry of distribution is not true. I hope this help a bit.
