# Joint PDF of all $n$ order statistics from distinct populations?

Let $$X_1, \ldots, X_n$$ be $$n$$ i.i.d. variables with probability density $$f(x)$$. Let $$X_{(1)}, \ldots, X_{(n)}$$ be the ordered statistics. Then the joint probability density of all $$n$$ order statistics is:

$$f_{X_{(1)}, \ldots, X_{(n)}}(x_1, \ldots, x_n) = n! \prod_{i=1}^n f(x_i),~ x_1 \leq \ldots, x_n \tag{1}$$

Assume now that $$Y_1, \ldots, Y_n$$ are not identically distributed but still independent variables with probability densities respectively $$f_i(x)$$. What is the joint probability density $$f_{Y_{(1)}, \ldots, Y_{(n)}}(y_1, \ldots, y_n)$$ of all the order statistics for $$Y_1, \ldots, Y_n$$?

I wonder if eq. (1) can be generalized in intuitive way:

$$f_{Y_{(1)}, \ldots, Y_{(n)}}(y_1, \ldots, y_n) = n! \prod_{i=1}^n f_i(y_i),~ y_1 \leq \ldots y_n \tag{2}$$

No, you can’t generalize in this manner, since each of the $$Y_{(i)}$$ could come from each of the distributions whereas your formula arbitrarily assigns each of them to some particular distribution.

First taking one step back, we should correct $$(1)$$; the correct form is

$$f_{X_{(1)}, \ldots, X_{(n)}}(x_1, \ldots, x_n) = [x_1\le x_2\le\cdots\le x_n]n! \prod_{i=1}^n f(x_i)\;,$$

where $$[c]$$ is the indicator function for the condition $$c$$. The corresponding expression in the case where the $$Y_i$$ are not identically distributed (but still independent; you didn’t mention that) is

$$f_{Y_{(1)}, \ldots, Y_{(n)}}(y_1, \ldots, y_n) = [y_1\le y_2\le\cdots\le y_n]\sum_{\sigma\in S_n} \prod_{i=1}^n f_i(y_{\sigma(i)})\;,$$

which is readily seen to reduce to the specific form for the case of identical distributions, and explains why it contains a factor of $$n!$$.

• Thanks for great clarification! Then how can I sample the ordered statistics realizations from $f_{Y_{(1)}, \ldots, Y_{(n)}}$? Following my notation for case of i.i.d. variables, we just need to generate $n$ values from $f(x)$ and sort them. Feb 20, 2020 at 15:14
• @PiotrSemenov: Indeed; that's the definition of the order statistics; you don't need their PDF for that purpose. Feb 20, 2020 at 15:15
• Right. But imagine you know nothing about the underlying distributions $f_i$. You know only joint PDF $f_{Y_{(1)}, \ldots, Y_{(n)}}$. Feb 20, 2020 at 15:28
• @PiotrSemenov: In which form do you have $f_{Y_{(1)}, \ldots, Y_{(n)}}$? Feb 20, 2020 at 16:49
• I guess it is too general problem I've just asked for. Let it be the normal multivariate distribution defined for ordered arguments. It has a non-zero mean vector and a diagonal covariance matrix. Anyway thanks for your answer! Feb 20, 2020 at 16:56