A ranking is a relationship between a set of items such that, for any two items, the first is either "ranked higher than", "ranked lower than" or "ranked equal to" the second.
In

RANKNUM, a Matlab function to compute the five types of ranks

Matlab Toolbox with functions to compute ranks

TrueSkill Ranking System

Ranking Library written in Ruby

{{Authority control Nonparametric statistics Comparison (mathematical)

mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...

, this is known as a weak order or total preorder of objects. It is not necessarily a total order
In mathematics, a total or linear order is a partial order in which any two elements are comparable. That is, a total order is a binary relation \leq on some set X, which satisfies the following for all a, b and c in X:
# a \leq a ( reflexiv ...

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
In materials science, hardness (antonym: softness) is a measure of the resistance to localized plastic deformation induced by either mechanical indentation or abrasion. In general, different materials differ in their hardness; for example hard ...

, while degrees of hardness are totally ordered. If two items are the same in rank it is considered a tie.
By reducing detailed measures to a sequence of ordinal numbers
In set theory, an ordinal number, or ordinal, is a generalization of ordinal numerals (first, second, th, etc.) aimed to extend enumeration to infinite sets.
A finite set can be enumerated by successively labeling each element with the least n ...

, rankings make it possible to evaluate complex information according to certain criteria. Thus, for example, an Internet search engine may rank the pages it finds according to an estimation of their relevance, making it possible for the user quickly to select the pages they are likely to want to see.
Analysis of data obtained by ranking commonly requires non-parametric statistics
Nonparametric statistics is the branch of statistics that is not based solely on parametrized families of probability distributions (common examples of parameters are the mean and variance). Nonparametric statistics is based on either being distri ...

.
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 anordinal measurement
Level of measurement or scale of measure is a classification that describes the nature of information within the values assigned to variables. Psychologist Stanley Smith Stevens developed the best-known classification with four levels, or scale ...

, 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 shorthand 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 (i.e., 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").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 equally receive the same ranking number, and the next items 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 themean
There are several kinds of mean in mathematics, especially in statistics. Each mean serves to summarize a given group of data, often to better understand the overall value ( magnitude and sign) of a given data set.
For a data set, the ''arith ...

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").
Here is an example:
Suppose you have the data set 1.0, 1.0, 2.0, 3.0, 3.0, 4.0, 5.0, 5.0, 5.0.
The ordinal ranks are 1, 2, 3, 4, 5, 6, 7, 8, 9.
For v = 1.0, the fractional rank is the average of the ordinal ranks: (1 + 2) / 2 = 1.5.
In a similar manner, for v = 5.0, the fractional rank is (7 + 8 + 9) / 3 = 8.0.
Thus the fractional ranks are: 1.5, 1.5, 3.0, 4.5, 4.5, 6.0, 8.0, 8.0, 8.0
Ranking in statistics

Instatistics
Statistics (from German: ''Statistik'', "description of a state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a scientific, industr ...

, ranking is the data transformation in which numerical or ordinal values are replaced by their rank when the data are sorted. For example, 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. For 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. (In some other cases, descending ranks are used.) Ranks are related to the indexed list of order statistics
In statistics, the ''k''th order statistic of a statistical sample is equal to its ''k''th-smallest value. Together with rank statistics, order statistics are among the most fundamental tools in non-parametric statistics and inference.
Impor ...

, which consists of the original dataset rearranged into ascending order.
Some kinds of statistical tests employ calculations based on ranks. Examples include:
* Friedman test
The Friedman test is a non-parametric statistical test developed by Milton Friedman. Similar to the parametric repeated measures ANOVA, it is used to detect differences in treatments across multiple test attempts. The procedure involves ranki ...

* Kruskal–Wallis test
* Rank product The rank product is a biologically motivated test for the detection of differentially expressed genes in replicated microarray experiments.
It is a simple non-parametric statistical method based on ranks of fold changes. In addition to its use in ...

s
* Spearman's rank correlation coefficient
In statistics, Spearman's rank correlation coefficient or Spearman's ''ρ'', named after Charles Spearman and often denoted by the Greek letter \rho (rho) or as r_s, is a nonparametric measure of rank correlation ( statistical dependence betwe ...

* Wilcoxon rank-sum test
* Wilcoxon signed-rank test
* Van der Waerden test
The distribution of values in decreasing order of rank is often of interest when values vary widely in scale; this is the rank-size distribution (or rank-frequency distribution), for example for city sizes or word frequencies. These often follow a power law
In statistics, a power law is a functional relationship between two quantities, where a relative change in one quantity results in a proportional relative change in the other quantity, independent of the initial size of those quantities: one q ...

.
Some ranks can have non-integer values for tied data values. For example, when there is an even number of copies of the same data value, the above described fractional statistical rank of the tied data ends in ½.
Percentile rank is another type of statistical ranking.
Rank function in Excel

Microsoft Excel
Microsoft Excel is a spreadsheet developed by Microsoft for Microsoft Windows, Windows, macOS, Android (operating system), Android and iOS. It features calculation or computation capabilities, graphing tools, pivot tables, and a macro (comp ...

provides two ranking functions, the Rank.EQ function which assigns competition ranks ("1224") and the Rank.AVG function which assigns fractional ranks ("1 2.5 2.5 4") as described above. The functions have the order argument, which is by default is set to ''descending'', i.e. the largest number will have a rank 1. This is generally uncommon for statistics where the ranking is usually in ascending order, where the smallest number has a rank 1.
Comparison of rankings

A rank correlation can be used to compare two rankings for the same set of objects. For example,Spearman's rank correlation coefficient
In statistics, Spearman's rank correlation coefficient or Spearman's ''ρ'', named after Charles Spearman and often denoted by the Greek letter \rho (rho) or as r_s, is a nonparametric measure of rank correlation ( statistical dependence betwe ...

is useful to measure the statistical dependence between the rankings of athletes in two tournaments. And the Kendall rank correlation coefficient is another approach.
Alternatively, intersection/overlap-based approaches offer additional flexibility.
One example is the "Rank–rank hypergeometric overlap" approach, which is designed to compare ranking of the genes that are at the "top" of two ordered lists of differentially expressed genes.
A similar approach is taken by the "Rank Biased Overlap (RBO)", which also implements an adjustable probability, p, to customize the weight assigned at a desired depth of ranking.
These approaches have the advantages of addressing disjoint sets
In mathematics, two sets are said to be disjoint sets if they have no element in common. Equivalently, two disjoint sets are sets whose intersection is the empty set.. For example, and are ''disjoint sets,'' while and are not disjoint. A c ...

, sets of different sizes, and top-weightedness (taking into account the absolute ranking position, which may be ignored in standard non-weighted rank correlation approaches).
Definition

This definition is due to Vaart, Chapter 13 Let $X\_1,..X\_n$ be a set of random variables. By sorting them into order, we have defined theirorder statistics
In statistics, the ''k''th order statistic of a statistical sample is equal to its ''k''th-smallest value. Together with rank statistics, order statistics are among the most fundamental tools in non-parametric statistics and inference.
Impor ...

$X\_\backslash leq\; ...\; \backslash leq\; X\_$
If all the values are unique, the rank of variable number $i$ is the unique solution $R\_$ to the equation $X\_i\; =\; X\_$.
In the presence of ties, we may either use a midrank (corresponding to the "Fractional Rank" defined above), defined as the average of all indices $i$ such that $X\_j\; =\; X\_$, or the uprank (corresponding to the "Modified Competition Ranking" above) defined by $\backslash sum\_^1\backslash $.
Applications

Ranking and socio-economic evaluation

The rank methodology based on some specific indices is one of the most common systems used by policy makers and international organizations in order to assess the socio-economic context of the countries. Some notable examples are: Human Development Index (United Nations), Doing Business Index (World Bank), Corruption Perceptions Index (Transparency International) and Index of Economic Freedom (the Heritage Foundation). For instance, the Doing Business Indicator of the World Bank measures business regulations and their enforcement in 190 countries. Countries are ranked according to 10 indicators that are synthetized to produce the final rank. Each indicator is composed of sub-indicators; for instance, the Registering Property Indicator is composed of 4 sub-indicators measuring time, procedures, costs and quality of the land registration system. Obviously, these kinds of ranks are based on subjective criteria for assigning the score. Sometimes, the adopted parameters may produce discrepancies with the empirical observations, therefore potential biases and paradox may emerge from the application of these criteria.Ranking as a social game

Being competitive is the very nature of human beings. The desire to achieve a higher social rank can be perceived as a driving force for human beings. In simple terms, we want to know who is the richest, the cleverest, the most handsome or prettiest. We are also sometimes ranked by others: our supervisors, our neighbors, and compare our status in society with that of the others. An inevitable question is how objective or subjective these rankings are? Many ranked lists are based on subjective categorization. We can even pose the question: do we always want to be seen objectively, or rather do not mind having a better image than we deserve? There are certainly specific difficulties in measuring society. In order to find our place in real and virtual communities we need to understand the issues emerging when navigating between objectivity and subjectivity by combining human and artificial intelligence. The set of subjects to treat this topics include comparison, ranking, rating, choices, laws, ranking games, struggle for reputation, etc (see Péter Érdi).Érdi, Péter ”Ranking- The unwritten rules of the social game we all play”, Oxford University Press (2020),Other examples

* Inpolitics
Politics (from , ) is the set of activities that are associated with making decisions in groups, or other forms of power relations among individuals, such as the distribution of resources or status. The branch of social science that stud ...

, rankings focus on the comparison of economic, social, environmental and governance performance of countries, see List of international rankings.
* In many sport
Sport pertains to any form of competitive physical activity or game that aims to use, maintain, or improve physical ability and skills while providing enjoyment to participants and, in some cases, entertainment to spectators. Sports can, ...

s, individuals or teams are given rankings, generally by the sport's governing body
A governing body is a group of people that has the authority to exercise governance over an organization or political entity. The most formal is a government, a body whose sole responsibility and authority is to make binding decisions in a taken g ...

.
** In association football
Association football, more commonly known as football or soccer, is a team sport played between two teams of 11 players who primarily use their feet to propel the ball around a rectangular field called a pitch. The objective of the game is t ...

(soccer), national teams are ranked in the FIFA World Rankings, the Women's World Rankings and, unofficially, in the World Football Elo Ratings.
** In the Olympic Games
The modern Olympic Games or Olympics (french: link=no, Jeux olympiques) are the leading international sporting events featuring summer and winter sports competitions in which thousands of athletes from around the world participate in a var ...

, each member country ( NOC) is ranked based upon gold, silver and bronze medal counts in the Olympic medal rankings.
** In basketball
Basketball is a team sport in which two teams, most commonly of five players each, opposing one another on a rectangular court, compete with the primary objective of shooting a basketball (approximately in diameter) through the defender's ...

, national teams are ranked in the FIBA World Rankings and the Women's World Rankings.
** In baseball
Baseball is a bat-and-ball sport played between two teams of nine players each, taking turns batting and fielding. The game occurs over the course of several plays, with each play generally beginning when a player on the fielding t ...

and softball
Softball is a game similar to baseball played with a larger ball on a smaller field. Softball is played competitively at club levels, the college level, and the professional level. The game was first created in 1887 in Chicago by George Han ...

, national teams are ranked in the WBSC World Rankings.
** In ice hockey
Ice hockey (or simply hockey) is a team sport played on ice skates, usually on an ice skating rink with lines and markings specific to the sport. It belongs to a family of sports called hockey. In ice hockey, two opposing teams use ice hock ...

, national teams are ranked in the IIHF World Ranking.
** In golf
Golf is a club-and-ball sport in which players use various Golf club, clubs to hit Golf ball, balls into a series of holes on a golf course, course in as few strokes as possible.
Golf, unlike most ball games, cannot and does not use a standar ...

, the top male golfers are ranked using the Official World Golf Rankings
The Official World Golf Ranking is a system for rating the performance level of professional golfers. It was started in 1986.
The rankings are based on a player's position in individual tournaments (i.e. not pairs or team events) over a "rolli ...

, and the top female golfers are ranked using the Women's World Golf Rankings.
** In snooker
Snooker (pronounced , ) is a cue sport played on a rectangular table covered with a green cloth called baize, with six pockets, one at each corner and one in the middle of each long side. First played by British Army officers stationed in I ...

, players are ranked using the Snooker world rankings.
** In tennis
Tennis is a racket sport that is played either individually against a single opponent ( singles) or between two teams of two players each ( doubles). Each player uses a tennis racket that is strung with cord to strike a hollow rubber ball c ...

, male and female players are ranked using the ATP rankings
The Pepperstone ATP rankings are the merit-based method used by the Association of Tennis Professionals (ATP) for determining the qualification for entry as well as the seeding of players in all singles and doubles tournaments. The first rankings ...

and WTA rankings
The WTA rankings are the Sports rating system, ratings defined by the Women's Tennis Association, introduced in November 1975.
Iga Świątek is the current world No. 1.
Ranking method
The WTA rankings are based on a rolling 52-week, cumu ...

respectively, whilst the ITF rankings are used for national Davis Cup
The Davis Cup is the premier international team event in men's tennis. It is run by the International Tennis Federation (ITF) and is contested annually between teams from competing countries in a knock-out format. It is described by the organi ...

and Fed Cup
The Billie Jean King Cup (or the BJK Cup) is the premier international team competition in women's tennis, launched as the Federation Cup in 1963 to celebrate the 50th anniversary of the International Tennis Federation (ITF). The name was cha ...

teams.
** In road bicycle racing
Road bicycle racing is the cycle sport discipline of road cycling, held primarily on paved roads. Road racing is the most popular professional form of bicycle racing, in terms of numbers of competitors, events and spectators. The two most common ...

, male cyclists have been ranked using the UCI World Ranking
The UCI men's road racing world rankings are a point system which is used to rank men's road cycling riders. Points are accrued over a rolling 52 weeks in three categories (Individual, Nations and Teams).
Also Year-End rankings exist, based on ...

from 2016, having previously been ranked using the UCI Road World Rankings from 1984 to 2004. Female cyclists have been ranked using the UCI Women's Road World Rankings since 1994.
** In track cycling
Track cycling is a bicycle racing sport usually held on specially built banked tracks or velodromes using purpose-designed track bicycles.
History
Track cycling has been around since at least 1870. When track cycling was in its infancy, it wa ...

riders and nations are ranked using the UCI Track Cycling World Ranking
** In chess
Chess is a board game for two players, called White and Black, each controlling an army of chess pieces in their color, with the objective to checkmate the opponent's king. It is sometimes called international chess or Western chess to dis ...

, players are ranked using the FIDE world rankings.
** In sailing
Sailing employs the wind—acting on sails, wingsails or kites—to propel a craft on the surface of the ''water'' (sailing ship, sailboat, raft, windsurfer, or kitesurfer), on ''ice'' ( iceboat) or on ''land'' (land yacht) over a chosen co ...

, boats are scored directly using the sum of the ranking.
** In bridge
A bridge is a structure built to span a physical obstacle (such as a body of water, valley, road, or rail) without blocking the way underneath. It is constructed for the purpose of providing passage over the obstacle, which is usually someth ...

, matchpoint scoring uses fractional ranking to assign the score.
* In relation to credit
Credit (from Latin verb ''credit'', meaning "one believes") is the trust which allows one party to provide money or resources to another party wherein the second party does not reimburse the first party immediately (thereby generating a debt ...

standing, the ranking of a security refers to where that particular security would stand in a wind up of the issuing company, i.e., its seniority in the company's capital structure
In corporate finance, capital structure refers to the mix of various forms of external funds, known as capital, used to finance a business. It consists of shareholders' equity, debt (borrowed funds), and preferred stock, and is detailed in the ...

. 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 In finance, senior debt, frequently issued in the form of senior notes or referred to as senior loans, is debt that takes priority over other unsecured or otherwise more "junior" debt owed by the issuer. Senior debt has greater seniority in the iss ...

would be paid out before subordinated debt
In finance, subordinated debt (also known as subordinated loan, subordinated bond, subordinated debenture or junior debt) is debt which ranks after other debts if a company falls into liquidation or bankruptcy.
Such debt is referred to as 'subordi ...

holders received any funds.
* Search engine
A search engine is a software system designed to carry out web searches. They search the World Wide Web in a systematic way for particular information specified in a textual web search query. The search results are generally presented in ...

s rank web pages by their expected relevance to a user's query using a combination of query-dependent and query-independent methods. Query-independent methods attempt to measure the estimated importance of a page, independent of any consideration of how well it matches the specific query. Query-independent ranking is usually based on link analysis; examples include the HITS algorithm Hyperlink-Induced Topic Search (HITS; also known as hubs and authorities) is a link analysis algorithm that rates Web pages, developed by Jon Kleinberg. The idea behind Hubs and Authorities stemmed from a particular insight into the creation of web ...

, PageRank
PageRank (PR) is an algorithm used by Google Search to rank web pages in their search engine results. It is named after both the term "web page" and co-founder Larry Page. PageRank is a way of measuring the importance of website pages. According ...

and TrustRank
TrustRank is an algorithm that conducts link analysis to separate useful webpages from spam and helps search engine rank pages in SERPs (Search Engine Results Pages). It is semi-automated process which means that it needs some human assistance ...

. Query-dependent methods attempt to measure the degree to which a page matches a specific query, independent of the importance of the page. Query-dependent ranking is usually based on heuristic
A heuristic (; ), or heuristic technique, is any approach to problem solving or self-discovery that employs a practical method that is not guaranteed to be optimal, perfect, or rational, but is nevertheless sufficient for reaching an immediate, ...

s that consider the number and locations of matches of the various query words on the page itself, in the URL or in any anchor text referring to the page.
* In Webometrics it is possible to rank institutions according to their presence in the web (number of webpages) and the impact of these contents (external inlinks=site citations), such as the Webometrics Ranking of World Universities The Webometrics Ranking of World Universities, also known as Ranking Web of Universities, is a ranking system for the world's universities based on a composite indicator that takes into account both the volume of the Web content (number of web page ...

* 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.
* The TrueSkill ranking system is a skill based ranking system for Xbox Live developed at Microsoft Research
* A bibliogram ranks common noun phrases in a piece of text.
* In language, the status of an item (usually through what is known as "downranking" or "rank-shifting") in relation to the uppermost rank in a clause; for example, in the sentence "I want to eat the cake you made today", "eat" is on the uppermost rank, but "made" is downranked as part of the nominal group "the cake you made today"; this nominal group behaves as though it were a single noun (i.e., I want to eat ''it''), and thus the verb within it ("made") is ranked differently from "eat".
* Academic journal
An academic journal or scholarly journal is a periodical publication in which scholarship relating to a particular academic discipline is published. Academic journals serve as permanent and transparent forums for the presentation, scrutiny, an ...

s are sometimes ranked according to impact factor
The impact factor (IF) or journal impact factor (JIF) of an academic journal is a scientometric index calculated by Clarivate that reflects the yearly mean number of citations of articles published in the last two years in a given journal, as ...

; the number of later articles that cite articles in a given journal.
See also

* League table *Ordinal data
Ordinal data is a categorical, statistical data type where the variables have natural, ordered categories and the distances between the categories are not known. These data exist on an ordinal scale, one of four levels of measurement described b ...

* Percentile rank
* Rating (disambiguation)
References

External links

RANKNUM, a Matlab function to compute the five types of ranks

Matlab Toolbox with functions to compute ranks

TrueSkill Ranking System

Ranking Library written in Ruby

{{Authority control Nonparametric statistics Comparison (mathematical)