# What exactly are order statistics?

Suppose $$X_1,X_2,X_3.....X_n$$ are random sample taken from a population. Then Y(1)<Y(2)<Y(3).....<Y(n) are called order statistics written in increasing order by magnitude where:

Y(1)=minimum($$X_1,X_2,X_3.....X_n$$)

Y(n)=maximum($$X_1,X_2,X_3.....X_n$$)

Now the questions are:

1. How can we find the minimum and maximum of random variable/sample as it's a function, it's not a single number.
2. Maybe there is a hint that r.v. are sorted by magnitude. Then what is magnitude of a random variable. Please explain with real examples.
• Can you expand on why you cannot find the minimum or maximum of a function? This seem false prima facie because of the existence of mathematical optimization in which functions are often minimized or maximized. Nov 27, 2021 at 15:22
• The magnitude of a random variable is similar to magnitudes of deterministic variables. For example, the standard deviation is a 2-norm on a random variable. $S_x = \sqrt{\mathbb{E}| X- \mathbb{E}[X] |^2} = \sqrt{\mathbb{E}[ X- \mathbb{E}[X] ]^2}$. Nov 27, 2021 at 15:26

How can we find the minimum and maximum of random variable/sample as it's a function, it's not a single number.

• As a number The maximum of a sample is the highest number of a sample. This is a single number.

• As a function But, when we consider the sample as a random variable that can take different values with different probabilities, then the maximum becomes a random variable that can take different values with different probabilities.

In this case we can describe the maximum with a function that described this probability for a specific value. (and the same for other order statistics)

Example: say you roll two six sided dices and you consider the highest value.

• For and particular roll the maximum is the highest number of the roll. For example, if you roll '4' and '1', then the maximum is '4'.

• For the distribution of the possible rolls of the maximum we compute the probabilities for a particular maximum. This will be the probability as function of the value of the maximum.

The figure below shows the maximum as function of the two dice rolls

$$\begin{array}{c|cccccc} &\color{red}1 & \color{orange}2 & \color{gold} 3 & \color{green} 4 & \color{blue}5 &\color{purple} 6 \\ \hline \color{red}1&\color{red} 1 & \color{orange}2 & \color{gold} 3 & \color{green}4 & \color{blue}5 &\color{purple} 6\\ \color{orange}2&\color{orange}2 &\color{orange} 2 & \color{gold} 3 & \color{green}4 & \color{blue}5 &\color{purple} 6\\ \color{gold} 3&\color{gold} 3 & \color{gold} 3 & \color{gold} 3 &\color{green} 4 & \color{blue}5 & \color{purple}6\\ \color{green}4&\color{green}4 & \color{green}4 & \color{green}4 &\color{green} 4 &\color{blue} 5 & \color{purple}6\\ \color{blue}5&\color{blue}5 &\color{blue} 5 &\color{blue} 5 &\color{blue} 5 &\color{blue} 5 &\color{purple} 6\\ \color{purple}6&\color{purple}6 &\color{purple} 6 & \color{purple}6 &\color{purple} 6 & \color{purple}6 & \color{purple}6\\ \end{array}$$

Then you can see that the probability that the maximum is $$1$$ is $$\frac{1}{36}$$, the probability that the maximum is $$2$$ is $$\frac{3}{36}$$, the probability that the maximum is $$3$$ is $$\frac{5}{36}$$, and so on.

We can describe it as a function

$$\mathbb{P}(\text{max(2 six sided dice rolls)} = k) = \frac{2k-1}{36}$$

• Did you type out all those LaTeX color commands, or use a script? It is a nice aesthetic touch. Nov 27, 2021 at 16:25
• @Galen sometimes I use a script but in this case it is much faster without using a script. (unless you call ctrl+c,ctrl+v using a script) Nov 27, 2021 at 16:46
• Yes, sometimes manual editing is most expedient. But for the record--for those who wish to emulate such $\TeX$ arrays--an R solution is cols <- c("", paste0("\\color{", c("red", "orange", "gold", "green", "blue", "purple"), "}")); s <- outer(0:6, 0:6, function(i,j) {k <- pmax(i,j); paste0(cols[k+1], ifelse(k > 0, k, ""))}); cat(paste(apply(s, 1, paste0, collapse=" & "), collapse="\\\\\n"))
– whuber
Nov 28, 2021 at 14:58
• The second paragraph of this answer is potentially confusing. The sample has to be considered a vector-valued function. The maximum, minimum, or indeed the entire array of order statistics are then (continuous) functions of those vector values.
– whuber
Nov 28, 2021 at 14:59