How to show that these two random number generating methods are equivalent?

Let $U$, $U_1$ and $U_2$ be independent uniform random numbers between 0 and 1. Can we show that generating random number $X$ by $X = \sqrt{U}$ and $X = \max(U_1,U_2)$ are equivalent?

2 Answers

Random variables $X = \sqrt{U}$ and $Y = \max(U_1, U_2)$ are equal in distribution. Indeed, both $0 \leqslant X(\omega) \leqslant 1$ and $0 \leqslant Y(\omega) \leqslant 1$. Furthermore, for $0 \leqslant x \leqslant 1$, we have $$F_X(x) = \mathbb{P}(X \leqslant x) = \mathbb{P}(\sqrt{U} \leqslant x) = \mathbb{P}(U \leqslant x^2) = x^2$$ $$F_Y(x) = \mathbb{P}(Y \leqslant x) = \mathbb{P}(\max(U_1,U_2) \leqslant x) = \mathbb{P}(U_1 \leqslant x, U_2 \leqslant x) \stackrel{\text{independence}}{=} \\\mathbb{P}(U_1 \leqslant x) \cdot \mathbb{P}(U_2 \leqslant x) = x^2$$

For every $x$ in $(0,1)$, $\mathrm P(\max\{U_1,U_2\}\leqslant x)=\mathrm P(U_1\leqslant x)\cdot\mathrm P(U_2\leqslant x)=x\cdot x=x^2$ and $\mathrm P(\sqrt{U}\leqslant x)=\mathrm P(U\leqslant x^2)=x^2$ hence $\max\{U_1,U_2\}$ and $\sqrt{U}$ follow the same distribution.