# Is there any connection between these two distributions?

I was playing with standard uniform distributions where I noticed a "weird" relation between two combinations and was wondering if there was an underlying reason for it (or if it is just coincidence).

Consider two variables $$X \sim U(0,1)$$ and $$Y | X \sim U(0,x)$$. The product distribution $$Z = XY$$ can be calculated and I find the result to be $$f_Z(z) = \frac{1}{\sqrt z} -1$$ when $$z \in [0,1]$$.

Consider now two standard uniform variables $$U,V$$ and a new variable $$W = (U - V)^2$$. This distribution can be computed analytically as well and I get $$f_W(w) = \frac{1}{\sqrt w} - 1$$ when $$w \in [0,1]$$.

Aside from this showing that two (different?) random variables ($$W$$ and $$Z$$) can share the same distribution, is there any connection between them that I am missing?

• When a distribution has multiple geneses, the interpretation of the differing generating mechanisms adds to the discussion of the distribution. For instance, the negative binomial distribution arises from a Poisson distribution with rate parameter following a gamma distribution and also as the sum of $N$ independent random variables each having a logarithmic distribution, where $N$ follows a Poisson law. Of course, there are dozens of geneses for the negative binomial distribution. Commented Jan 7, 2022 at 21:13
• Can you clarify what you mean by "a logarithmic distribution"? Commented Jan 8, 2022 at 3:39
• The distribution of $Z$ seems to be also equivalent to $X_1^2X_2$ with iid $X_i\sim U(0,1)$. That is, we can relate $X = X_1 \sim U(0,1)$ and $Y\vert X_1= X_1X_2 \sim U(0,X_1)$. Commented Jan 10, 2022 at 17:06

There is a different representation. For $$X \sim U(0,1)$$ and $$Y \sim U(0,1)$$ we have that

$$Z = XY^2 \sim (X-Y)^2$$

with $$f_Z(z) = \frac{1}{\sqrt{z}} - 1$$

Below is a plot of isolines for the two cases $$Z = XY^2$$ (broken black lines) and $$Z = (X-Y)^2$$ (solid gray lines). The equations to draw these lines are $$Y = \sqrt{Z/X}$$ for black and $$Y = X - \sqrt{Z}$$ and $$Y = X + - \sqrt{Z}$$ for gray.

Let's focus on the complementary cumulative distribution $$\bar{F}_Z(z) = 1 - {F}_Z(z) = P(Z>z)$$.

This probability is equal to the area bounded by those isolines.

• For the gray isolines, which are straight lines, we can compute it easily. It is the area bounded by a triangle of size $$1-\sqrt(z)$$ (and the isolines are on both sides so we have to multiply by two). $${F}_Z(z) = (1-\sqrt{z})^2$$

• For the black isolines, which have a bend, we can use an integral

$$\begin{array}{} \bar{F}_Z(z) &=& \int_z^1 1- \frac{\sqrt{z}}{\sqrt{x}} dx \\ &=& x - 2\sqrt{x}\sqrt{z} \,\, \Biggr|_{z}^{1} \\ &=& (1 - 2\sqrt{1}\sqrt{z}) - (z - 2\sqrt{z}\sqrt{z}) \\ &=& (1-\sqrt{z})^2 \end{array}$$

We see that the pattern is quite different but both of these have the same distribution.

I doubt that there might be an intuitive connection. One try that can be done is to see if some transformation from the points on the line $$Z = XY^2$$ to the line $$Z = (X-Y)^2$$ might be possible.