# Random draw of an ordered vector - two equivalent approaches?

The goal is to end up with a ordered vector $v=(v_1,\dots,v_n)\in \mathbb{R}^n$ of $n$ random draws $v_1\leq v_2\dots\leq v_n$.
The random draws $v_i$ are iid, following a probability distribution with density $f$ mapping from the interval $I$ to $\mathbb{R}^+$ and with CDF $F$.

Does it matter whether I draw my vector directly from the set $\mathbb{O}=\{v\in\mathbb{R}|v_1\leq v_2\dots\leq v_n\}$ (with density functions potentially renormalized on the simplex) or whether I draw from the set $\mathbb{U}=I^n$ and sort the draws afterwards?

Would I end up with the same distribution of samples? Unfortunately, I do not have any idea how to adress this problem in general.

BONUS: Is the distribution of $v_1$ identical for both approaches? For the second approach, I know that the CDF of $v_1$ is $F_{v_1}(x)=1-[1-F(x)]^n$. Is this identical for the first case?

• Both method are identical - whether you first generate a set of i.i.d. random variables and do sorting, or directly generate from the joint CDF of the ordered statistics. But the sorting approach will be simpler to implement as you need to deal with the dependency structure. – BGM May 14 '18 at 8:02
• @BGM Thanks for your answer. This coincides with my intuition (and hope). Do you have a (somewhat) rigorous argument? And does your answer imply that my bonus question is true? – MathProb May 14 '18 at 8:13
• Not sure what argument you want for that - We can find the joint pdf of ordered sample (assuming continuous), and you want to prove that? – BGM May 14 '18 at 8:22
• @BGM Is this a well known fact? If so, do you have a reference? I couldn't find it. How does the pdf on $\mathbb{O}$ look like? Is it $n\Pi_{i=1}^nf(v_i)$ or anything like that? If this is a trivial, well known fact, please fell free to post it as an answer and I would happily accept it. – MathProb May 14 '18 at 16:07
• Say you have a function $g: \mathbb{R}^n \to \mathbb{R^n}$. Consider a random vector $\mathbf{X} \in \mathbb{R}^n$. To generate the random vector $g(\mathbf{X})$, you can first generate $\mathbf{X}$ and then transformed by $g$. And you may have other method/algorithm to generate $g(\mathbf{X})$ from its theoretical distribution, and the distribution of these generated $g(\mathbf{X})$ will be the same if your algorithm is legitimate. – BGM May 14 '18 at 17:02