Ranking

Ranking is the process of positioning items such as individuals, groups or businesses on an ordinal scale in relation to others. A list arranged in this way is said to be in rank order.

A ranking can be obtained by evaluating each item in the collection in such a way that any two items can then be compared to see which should come higher in the ranking. In mathematical terms, this is known as a of objects. It is not necessarily a total order of objects because two different objects can have the same ranking. The rankings themselves are totally ordered. For example, materials are totally preordered by hardness, while degrees of hardness are totally ordered.

By reducing detailed measures to a sequence of ordinal numbers, rankings make it possible to evaluate complex information according to certain critera. Thus, for example, an Internet search engine may rank the pages it finds according to an evaluation of their relevance, making it possible for the user quickly to select the pages they are likely to want to see.

Ranking is a technique commonly used in non-parametric statistics.

Examples of ranking

 * In many sports, individuals or teams are given rankings, generally by the sport's governing body
 * In football (soccer), national teams are ranked in the FIFA World Rankings and, unofficially, in the World Football Elo Ratings.
 * In snooker, players are ranked using the Snooker world rankings
 * In ice hockey, national teams are ranked in the IIHF World Ranking
 * In golf, the top male golfers are ranked using the Official World Golf Rankings
 * In relation to credit standing, the ranking of a security refers to where that particular security would stand in a wind up of the issuing company. For instance, capital notes are subordinated securities; they would rank behind senior debt in a wind up. In other words the holders of senior debt would be paid out before subordinated debt holders received any funds.
 * Some sites propose the user to rank whatever exists (what's the best restaurant, the best city, the most popular dog, the top scorer in international air-guitar, ...), like the most wellknown in Europa Rankingfever
 * Search engines rank web pages depending on their relevance to a user's query. See HITS algorithm, PageRank, TrustRank.
 * In video gaming, players may be given a ranking. To "rank up" is to achieve a higher ranking relative to other players, especially with strategies that do not depend on the player's skill.
 * A bibliogram ranks common noun phrases in a piece of text.

...

Strategies for assigning rankings
It is not always possible to assign rankings uniquely. For example, in a race or competition two (or more) entrants might tie for a place in the ranking. When computing an ordinal measurement, two (or more) of the quantities being ranked might measure equal. In these cases, one of the strategies shown below for assigning the rankings may be adopted.

A common short-hand way to distinguish these ranking strategies is by the ranking numbers that would be produced for four items, with the first item ranked ahead of the second and third (which compare equal) which are both ranked ahead of the fourth. These names are also shown below.

Standard competition ranking ("1224" ranking)
In competition ranking, items that compare equal receive the same ranking number, and then a gap is left in the ranking numbers. The number of ranking numbers that are left out in this gap is one less than the number of items that compared equal. Equivalently, each item's ranking number is 1 plus the number of items ranked above it. This ranking strategy is frequently adopted for competitions, as it means that if two (or more) competitors tie for a position in the ranking, the position of all those ranked below them is unaffected (ie, a competitor only comes second if exactly one person scores better than them, third if exactly two people score better than them, fourth if exactly three people score better than them, etc).

Thus if A ranks ahead of B and C (which compare equal) which are both ranked ahead of D, then A gets ranking number 1 ("first"), B gets ranking number 2 ("joint second"), C also gets ranking number 2 ("joint second") and D gets ranking number 4 ("fourth"). In this case, nobody would get ranking number 3 ("third") and that would be left as a gap.

Modified competition ranking ("1334" ranking)
Sometimes, competition ranking is done by leaving the gaps in the ranking numbers before the sets of equal-ranking items (rather than after them as in standard competition ranking). The number of ranking numbers that are left out in this gap remains one less than the number of items that compared equal. Equivalently, each item's ranking number is equal to the number of items ranked equal to it or above it. This ranking ensures that a competitor only comes second if they score higher than all but one of their opponents, third if they score higher than all but two of their opponents, etc.

Thus if A ranks ahead of B and C (which compare equal) which are both ranked ahead of D, then A gets ranking number 1 ("first"), B gets ranking number 3 ("joint third"), C also gets ranking number 3 ("joint third") and D gets ranking number 4 ("fourth"). In this case, nobody would get ranking number 2 ("second") and that would be left as a gap.

Dense ranking ("1223" ranking)
In dense ranking, items that compare equal receive the same ranking number, and the next item(s) receive the immediately following ranking number. Equivalently, each item's ranking number is 1 plus the number of items ranked above it that are distinct with respect to the ranking order.

Thus if A ranks ahead of B and C (which compare equal) which are both ranked ahead of D, then A gets ranking number 1 ("first"), B gets ranking number 2 ("joint second"), C also gets ranking number 2 ("joint second") and D gets ranking number 3 ("third").

Ordinal ranking ("1234" ranking)
In ordinal ranking, all items receive distinct ordinal numbers, including items that compare equal. The assignment of distinct ordinal numbers to items that compare equal can be done at random, or arbitrarily, but it is generally preferable to use a system that is arbitrary but consistent, as this gives stable results if the ranking is done multiple times. An example of an arbitrary but consistent system would be to incorporate other attributes into the ranking order (such as alphabetical ordering of the competitor's name) to ensure that no two items exactly match.

With this strategy, if A ranks ahead of B and C (which compare equal) which are both ranked ahead of D, then A gets ranking number 1 ("first") and D gets ranking number 4 ("fourth"), and either B gets ranking number 2 ("second") and C gets ranking number 3 ("third") or C gets ranking number 2 ("second") and B gets ranking number 3 ("third").

In computer data processing, ordinal ranking is also referred to as "row numbering"....

Fractional ranking ("1 2.5 2.5 4" ranking)
Items that compare equal receive the same ranking number, which is the mean of what they would have under ordinal rankings. Equivalently, the ranking number of 1 plus the number of items ranked above it plus half the number of items equal to it. This strategy has the property that the sum of the ranking numbers is the same as under ordinal ranking. For this reason, it is used in computing Borda counts and in statistical tests (see below).

Thus if A ranks ahead of B and C (which compare equal) which are both ranked ahead of D, then A gets ranking number 1 ("first"), B and C each get ranking number 2.5 (average of "joint second/third") and D gets ranking number 4 ("fourth").

Ranking in statistics
Some kinds of statistical tests employ the use calculations based on ranks. Examples: Ranks can have non-integer values for tied data values. When there is an even number of the same data value, the statistical rank (being the median rank of the tied data) ends in ½.
 * Friedman test
 * Wilcoxon rank-sum test
 * Wilcoxon signed-rank test
 * Kruskal-Wallis test

Some related statistical tests employ the use of u-scores, which are computed as the number of inferior minus the number of superior items. Examples:
 * Sign test
 * Mann-Whitney U test

For univariate data, tests ranks and u-scores are equivalent (Example: The "Wilcoxon/Mann-Whitney test"). For multivariate data, however, generalizations of ranks (Kalbfleisch and Prentice 1973) and u-scores (Hoeffding 1948) can differ.

Rank function in Excel
The rank function in Microsoft Excel assigns competition ranks ("1224") as described above. For some statistical purposes, that is not the desired result - for instance, it means that the sum of ranks for a list of a given length changes depending on the number of ties. Pottel has described a user defined ranking function which assigns fractional ranks to ties to keep the sum consistent.