Construct random variables $Y_{1}The problem is as follows:
On a probability space $(\Omega, E, P)$, we define the random variable $(X_{1}, X_{2},\cdots, X_{n})$ with values in $\mathbb{R}^{n}$ and the density function being $\mathbb{1}_{[0,1]^{n}}(x_{1}, x_{2},\cdots, x_{n})$.
(1) For any permutation $\sigma\in S_{n}$, let $A_{\sigma} = \{\omega\in\Omega: X_{\sigma_{1}}(\omega)<X_{\sigma_{2}}(\omega)<\cdots<X_{\sigma_{n}}\}$. Construct the random variable $(Y_{1},Y_{2},\cdots,Y_{n})$ on $(\Omega, E, P)$ using $(A_{\sigma})_{\sigma\in S_{n}}$ such that the following statement holds almost surely
$$Y_{1}<Y_{2}<\cdots<Y_{n} \text{ and } \{Y_{i}(\omega): \omega\in\Omega, 1\leq i\leq n\} = \{X_{i}(\omega): \omega\in\Omega, 1\leq i\leq n\} $$
(2) Determine the distribution of the two vectors of random variables $(Y_{1},\cdots,Y_{n})$ and $(\frac{Y_{1}}{Y_{2}}, \frac{Y_{2}}{Y_{3}}, \cdots, \frac{Y_{n}}{Y_{n-1}})$.
I don't know how to approach this problem. $\{Y_{i}(\omega): \omega\in\Omega, 1\leq i\leq n\} = \{X_{i}(\omega): \omega\in\Omega, 1\leq i\leq n\}$ seems to prevent creating arbitrary functions $Y_{i}$ that satisfy $Y_{1}<Y_{2}<\cdots<Y_{n}$.
Any help is appreciated.
 A: Let $A:=\bigcup_{1\leqslant i<j\leqslant n}\{X_i=X_j\}$, then $\mathbb{P}(A)=0$. We define for all $\omega\in\Omega$, $\sigma(\omega):={\rm Id}_{\mathfrak{S}_n}$ if   $\omega\in A$ and if $\omega\notin A$, $\sigma(\omega):=\tau$ where $\tau\in\mathfrak{S}_n$ is the unique permutation such that $\omega\in A_{\tau}$. Now let $Y_i(\omega):=X_{\sigma(\omega)(i)}$, by construction we have $Y_1<\ldots<Y_n$ and $\{Y_1,\ldots,Y_n\}=\{X_1,\ldots,X_n\}$ a.s. and $Y_i$ is a random variable as for all measurable set $B$,
$$ \{Y_i\in B\}=\bigcup_{\tau\in\mathfrak{S}_n}\{Y_i\in B,\sigma=\tau\}=\bigcup_{\tau\in\mathfrak{S}_n}\{X_{\tau(i)}\in B ,X_{\tau(1)}<\ldots<X_{\tau(n)} \}\cup (A\cap\{X_i\in B\}) $$
which is measurable. Now let $\mathcal{D}:=\{(x_1,\ldots,x_n)\in[0,1]^n,x_1<\ldots<x_n\}$, then for all measurable set $B$, we have
$$ \begin{aligned} \mathbb{P}((Y_1,\ldots,Y_n)\in B) &= \sum_{\tau\in\mathfrak{S}_n}\mathbb{P}((Y_1,\ldots,Y_n)\in B,\sigma=\tau) \\
&= \sum_{\tau\in\mathfrak{S}_n}\mathbb{P}((X_{\tau(1)},\ldots,X_{\tau(n)})\in B\cap\mathcal{D}) \\
&= n!\mathbb{P}((X_1,\ldots,X_n)\in B\cap\mathcal{D}) \\
&= n!\int_{B\cap\mathcal{D}}dx_1\ldots dx_n
\end{aligned} $$
therefore the density of $(Y_1,\ldots,Y_n)$ is $n!\chi_{\mathcal{D}}$. As for the density of $\left(\frac{Y_1}{Y_2},\ldots,\frac{Y_{n-1}}{Y_n}\right)$, first compute the density of $\left(\frac{Y_1}{Y_2},\ldots,\frac{Y_{n-1}}{Y_n},Y_n\right)$ and integrate it along the last coordinate. You'll get
$$ (x_1,\ldots,x_{n-1})\mapsto (n-1)!\prod_{i=2}^{n-1}x_i^{i-1}\chi_{[0,1]^{n-1}}(x_1,\ldots,x_{n-1}) $$
EDIT : Let $\varphi:\mathbb{R}^n\rightarrow\mathbb{R}$, then
$$ \mathbb{E}\left[\varphi\left(\frac{Y_1}{Y_2},\ldots,\frac{Y_{n-1}}{Y_n},Y_n\right)\right]=n!\int_{\mathcal{D}}\varphi\left(\frac{y_1}{y_2},\ldots,\frac{y_{n-1}}{y_n},y_n\right)dy_1\ldots dy_n $$
Substitute $x_i=\frac{y_i}{y_{i+1}}$ for $i\leqslant n-1$ and $x_n=y_n$, you get
$$ \mathbb{E}\left[\varphi\left(\frac{Y_1}{Y_2},\ldots,\frac{Y_{n-1}}{Y_n},Y_n\right)\right]=n!\int_{[0,1]^n}\varphi(x_1,\ldots,x_n)\prod_{i=2}^n x_i^{i-1} dx_1\ldots dx_n $$
Therefore the density of $\left(\frac{Y_1}{Y_2},\ldots,\frac{Y_{n-1}}{Y_n},Y_n\right)$ is $(x_1,\ldots,x_n)\mapsto n!\prod_{i=2}^n x_i^{i-1}\chi_{[0,1]^n}(x_1,\ldots,x_n)$. It remains to integrate this with respect to
$x_n$.
