In statistics, ranking is the data transformation in which numerical or ordinal values are replaced by their rank when the data are sorted.
For example, if the numerical data 3.4, 5.1, 2.6, 7.3 are observed, the ranks of these data items would be 2, 3, 1 and 4 respectively.
As another example, the ordinal data hot, cold, warm would be replaced by 3, 1, 2. In these examples, the ranks are assigned to values in ascending order, although descending ranks can also be used.
Ranks are related to the indexed list of order statistics, which consists of the original dataset rearranged into ascending order.