# What exactly are order statistics?

I'm very confused by what these are. My definition reads:

Let $Z_1,\dots,Z_n$ take the values of random variables $X_1,\dots, X_n,$ arranged in increasing order so that $Z_1\leq \cdots\leq Z_n$. We call $Z_1,\dots ,Z_n$ order statistics.

What is bothering me is arranging random variables in increasing order: I thought random variables were functions, so I don't understand how we can do this. Can someone explain what these are, more intuitively?

• Random variables are functions that take different "values" depending on outcomes of the random experiment. So, $X_1$ is a function but when the random experiment is done, it takes on a "value" that we denote by $Z_1$. – Hoda Apr 9 '14 at 0:24
• When you do your experience, the random variables $X_i$ take some values. Once these values are known, arrange them in increasing order. Note that $Z_1 = \min(X_i)$ and $Z_n = \max(X_i)$. Similarly, for example, $Z_2$ takes the value of the second lowest value attained by the random variables $X_i$. For different realizations of the experience, the second lowest value will differ and it will not always be the same $X_j$ that will take it. – Amateur Apr 9 '14 at 0:25

We know that there is a natural way to think of making new random variables from existing ones; e.g., suppose $X_1, X_2$ are random variables (not necessarily IID) and we can define $Y = g(X_1, X_2)$ for some function $g$. For instance, $g(a,b) = a+b$ and so $Y = X_1 + X_2$.
When we think of the $k^{\rm th}$ order statistic, the function $g$ is simply a particular type of function, namely $g(x_1, x_2, \ldots, x_n) = x_{\pi(k)}$, where $\pi(k)$ is the index of the $k^{\rm th}$ smallest value in the set $\{x_1, \ldots, x_n\}$.
It is important to emphasize here that $g$ is necessarily a function of all of the random variables being ordered, even though the value of $g(x_1, \ldots, x_n)$ is simply one of those $x_i$'s. The randomness of an order statistic is inherited from the entire set of random variables being ordered, in as much as $Y = X_1 + X_2$ has randomness from both $X_1$ and $X_2$.