1 Introduction

Sports and games can be described as hierarchical complex systems due to the myriad of factors influencing the dynamics of competition and performance in them, including networked interactions, human and environmental heterogeneities, and other traits at the individual and group levels [14]. In particular, the performance of players and teams is influenced by a variety of causes: Economical, political and geographical conditions determine their rankings and may thus be used for predicting performance. Moreover, the (relatively) simple rules of competition and measures of performance associated with sports and games allow us to explore basic mechanisms of interaction leading to hierarchy formation, which may be common to many systems driven by competition, not only leisure activities but other social, biological and economic systems. With this goal in mind, the availability of a large corpus of data related to sports, teams, and players allows researchers to perform multiple statistical analyses, in particular with respect to the structure and dynamics of performance rankings [57].

Data availability has made it possible not only to study the distribution of scores determining rankings, but also its time evolution [8]. In a recent paper, Deng et al. present a statistical analysis of 12 sports and report a universal scaling in rankings, despite the fact that the sports considered have very different ranking systems [9]. Here, we focus on the temporal trajectories of player and team performances, meaning the evolution of rank, with the objective of finding statistical regularities that indicate how competition shapes hierarchies of players and teams. In principle, rankings may be affected in time by events as apparently insignificant as a bad breakfast prior to an important event, or the weather during a competition [10]. Since these factors are inherently present for all activities, we would expect the evolution of rank to have generic features across sports and games.

We propose to quantify such evolution by means of a recently introduced measure, the rank diversity. With the help of the Google n-gram dataset [11], rank diversity has been used before to study how vocabulary changes in time [12]. That work shows that rank diversity has the same functional form for all languages studied, and is able to discriminate the size of the core of each language. Thus, here we concentrate on the temporal features of rank distributions corresponding to several sports and games with different ranking schemes. We consider data where an appropriate time resolution is available, and limit the analysis to six activities only: tennis, chess, golf, poker and football (both national teams and clubs). We find that all rank diversities have the same functional form as languages, despite having differences in their rank frequency distributions. Finally, we introduce a random walk model that, tuned by the parameter values of each dataset, reproduces qualitatively the diversity of all sports and games considered. Overall, our goal is to use rank diversity as a tool to understand rank dynamics in sports, games, and other hierarchical complex systems, thus enabling us to identify the dependence on rank of a change in the hierarchy of the system. By using this analysis, we may be able to estimate how well can a change in rank be predicted, regardless of the particularities of the phenomenon under study.

The article is organized as follows. In Section 2 we describe the datasets used. We then analyse ranking distributions in Section 3 and compare them with several models. In Section 4 we study the rank diversity for each sporting activity and compare it with a random walk model. The main conclusions of our analysis are included in Section 5. In Appendix A we discuss in detail the Kolmogorov-Smirnov index, which measures the goodness of fit for a given dataset. Finally, in Appendix B we describe the generic relation between rank diversity and the cumulative rank distribution in the random walk model.

2 Ranking data

We use ranking data on players and teams from six sports and games: (a) Tennis players (male), ranked by the Association of Tennis Professionals (ATP) [13]; (b) Chess players (male), ranked by the Fédération Internationale des Échecs (FIDE) [14]; (c) Golf players, ranked by the Official World Golf Ranking (OWGR) [15]; (d) Poker players, ranked by the Global Poker Index (GPI) [16]; (e) Football teams, ranked by the Football Club World Ranking (FCWR) [17]; and (f) national football teams, ranked by the Fédération Internationale de Football Association (FIFA) [18].

The ranking procedure varies among sports. In ATP, for example, tennis players are ordered according to the number of points they have up to the date of publication of the ranking. The number of points depends on the tournaments players have participated in (and how well they have performed), but not all tournaments are taken into account. FIDE uses the Elo system [19] to rank players, which considers the number of matches, their results, and the opponent ranking. The FIFA ranking takes into account official matches between countries. The number of points depends on the confederation and classification of each team, as well as the importance and result of the match. Table 1 summarises the main properties of the ranking data considered in this study, including the time resolution used to measure rankings (i.e. the time difference between two snapshots of the ranking in a sport or game). In order to have a homogeneous distribution of ranking snapshots and the same number of players/teams in each snapshot for a given activity, we disregard some data for the ATP, FIDE, OWGR, GPI, and FIFA datasets: In all of these cases, the time elapsed between the publication of two rankings varies greatly (from less than a week to more than a month), and the number of players/teams across ranking snapshots may change as well. Therefore, for each dataset we choose a constant time resolution of rankings (weeks or months, as shown in Table 1) that maximises and keeps constant the number of ranked players/teams throughout time. All datasets, filtered as explained above, are included in Additional file 1.

Table 1 Summary of ranking data for each sport and game considered in this study

3 Comparison with ranking models

Player or team performance is usually measured by a score that varies with time. This score results in a time-dependent rank with a rather complex behaviour, as we will explain below. We first focus on the distribution of scores versus ranks (i.e. a rank distribution) for a given time. Particularly, we are interested in seeing if this distribution can be reproduced by a single ranking model for all sports and games considered. We select five ranking models to fit the data, four of which are particular cases of

$$ f(k)=\mathcal{N}\frac{(N+1-k)^{q}\exp(-bk)}{k^{a}}, $$
(1)

where f is the score associated with rank k, a is an exponent that dominates most of the curve, b an exponent controlling its exponential decay, and q an algebraic decay that regulates a sharp drop of the curve for large k. Finally, N is the total number of elements (i.e. players or teams) in the system, and \(\mathcal{N}\) is a normalization constant.

The first four models are

$$ \begin{aligned} &m_{1}(k) \propto\frac{1}{k^{a}}, \qquad m_{2}(k) \propto\frac{\exp(-bk)}{k^{a}}, \\ &m_{3}(k) \propto\frac{(N+1-k)^{q }}{k^{a}}, \qquad m_{4}(k) = f(k), \end{aligned} $$
(2)

whereas the fifth model is a double Zipf law [20],

$$ m_{5} (k)=\mathcal{N} \textstyle\begin{cases} \frac{1}{k^{a}}, & k\leq k_{c}, \\ \frac{k_{c}^{a'-a}}{k^{a'}}, & k>k_{c}, \end{cases} $$
(3)

with \(a'\) an alternative exponent that regulates the behaviour of the curve after a critical rank \(k_{c}\). Model \(m_{1}\) is obtained by setting \(q=b=0\) in Eq. (1), and has been considered in a vast amount of studies, both in the realm of sports [21, 22] and in other studies of ranking behaviour [23], including the famous Zipf’s law of languages where the particular case \(a=1\) has drawn a lot of attention (see, e.g., [24] and references therein). The Gamma (\(m_{2}\)) and Beta (\(m_{3}\)) distributions have been useful in many disciplines for decades; a quick look at their Wikipedia entries provides numerous examples [25, 26]. Model \(m_{4}\), being a more general expression than the previous ones, tends to provide a better fit at the expense of more parameters, and will serve as benchmark for the comparison between the rest of the models. Finally, model \(m_{5}\) in Eq. (3) has been used with success in several contexts [20, 27], prompting us to test it in the area of sports and games.

The results of the fitting process between data and Eqs. (1)-(3) are shown in Figure 1, while Table 2 summarises the parameter values obtained. Data corresponds to a single time snapshot for all sports and games: Dec 27 2010 (ATP); Sept 2014 (FIDE); Mar 18 2015 (GPI); Apr 19 2015 (OWGR); Dec 29 2014 or Week 53 2014 (FCWR); and Dec 18 2014 (FIFA). The following results are, however, representative of all time snapshots (see Table 3 and the text below for further details). Both models and data show variation in their goodness of fit. From Figure 1 it is clear that Zipf’s law (\(m_{1}\)) is not adequate. On the other hand, the Gamma distribution (\(m_{2}\)) fits some datasets rather well, particularly those that do not show an abrupt fall of score as a function of rank. Datasets with an abrupt decay of frequency are well fitted by the Beta distribution (\(m_{3}\)) instead. However, most sports and games seem to be an intermediate case where both functions capture global behaviour accurately, and thus the fit is considerably better for a combination of both models, i.e. \(m_{4}\). We also see that the double Zipf law (\(m_{5}\)) is a good fit for FIDE and GPI, as seen from Table 3.

Figure 1
figure 1

Comparison of ranking data with several models. Plot showing the rank distributions (score versus rank k) for all sports considered in this study, at one time slice, as well as their fits with the four models in Eqs. (1)-(2). In general, Zipf’s law (\(m_{1}\)) does not accurately reproduce the ranking of any sport or game reported here. Both the Gamma (\(m_{2}\)) and Beta (\(m_{3}\)) distributions seem to be appropriate in some cases. Overall, most datasets are well fitted by a combination of both functions, model \(m_{4}\). Although these plots correspond to one time slice only, results are representative of the entire datasets (see Table 3 for further details). For the sake of clarity, \(m_{5}\) and tick labels are not shown.

Table 2 Parameter values for fitting process between sports data and ranking models
Table 3 Goodness of fit measures

In order to objectively compare goodness of fit between models, we consider several measures: The coefficient of determination \(R^{2}\) [28], the maximum deviation between theory and observation D, and the Kolmogorov-Smirnov index p [28, 29]. The coefficient \(R^{2}\) is calculated from the 2-norm with respect to the data coming from a single time snapshot,

$$ R^{2} = 1 - \frac{\sum_{k} [m_{i}(k)-y_{k})]^{2}}{\sum_{k} [y_{k}-\langle y \rangle]^{2}}, $$
(4)

for a given model \(m_{i}(k)\), \(i = 1, \ldots, 5\), and data \(y_{k}\), where \(\langle y \rangle\) is the expectation value of \(y_{k}\). The closer \(R^{2}\) is to one, the better the fit is. To calculate D, we consider the cumulative of both the proposed distribution \(m_{i}(k)\) and a dataset with N data points (the equivalence between an empirical rank-value distribution and the empirical cumulative distribution corresponding to scores is discussed in [28]). There it is also shown that for a given theoretical rank distribution \(m_{i}(k)\), the cumulative is simply \(M_{i}(m_{i}) = [N+1-k(m_{i})] / [N+1]\), where \(k=k(m_{i})\) is the inverse function of \(m_{i}\) that implicitly depends on scores. Whereas for a dataset, \(M_{\mathrm{data}}(s) =(1/N) \sum_{j} \theta(s-s_{j})\), with θ a step function and \(\{ s_{i},\ldots,s_{N}\}\) the set of scores in the data [28]. We then define D (the so-called Kolmogorov statistics) as the maximum vertical difference between the two curves, \(D = \sup_{s}\vert M_{i}(m_{i}) - M_{\mathrm{data}}(s) \vert \). The calculation of the Kolmogorov-Smirnov index p is more involved so we discuss it in Appendix A. The measure p allows us to consider that a small dataset will have some noise due to poor statistics. Thus, if a model is consistent with a dataset, but we have poor statistics, we might still have a good (large) p. Usually, a ‘good’ fit is required to have \(p>0.1\), see e.g. [30].

Table 3 shows the mean values \(\langle R^{2} \rangle\) and \(\langle D \rangle\) (and their associated standard deviations \(\sigma_{D}\) and \(\sigma_{R^{2}}\)), averaged over all time slices available, for the fitting process between the six datasets and five models \(m_{i}\) used here. We also include values of p for the single time slice of Figure 1. Higher \(\langle R^{2} \rangle\) and lower \(\langle D \rangle\) imply better fits. Since \(\sigma_{D}\) and \(\sigma_{R^{2}}\) are small, the fits shown in Figure 1 are representative of the entire datasets. We observe that none of the models are a good fit for all sports and games, although \(m_{4}\) and \(m_{5}\) are the most appropriate (in terms of \(R^{2}\)). However, in three cases (FIDE, GPI, and FCWR) we have \(p=0\) for model \(m_{4}\), and no model fits well, meaning that the theoretical distribution is not followed by the data. We stress again that Zipf’s law (\(m_{1}\)) is the worst fit among all considered, except for FIDE. It is interesting to notice that \(R^{2}\) and p lead to different criteria of what is a ‘good’ or a ‘bad’ model. This is due to both the amount of available data and the number of parameters in the model. The larger the data, the easier it is to distinguish the best available model from a good (but not accurate enough) approximation. On the other hand, the more parameters the model has, the easier it is to fit any data. Both of these aspects are taken into account in the definition of p, but not in \(R^{2}\).

4 Rank diversity in sports and games

The previous analysis of the functional form of the rank distribution in several sporting activities (even when the goodness of fit has been averaged over time) is restricted by the fact that the rank distribution is inherently an instantaneous measure, in the sense that it captures ranking at a given point in time and does not take into account the dynamics of players and teams changing rank as time goes by. In order to overcome this issue, here we contribute to the analysis of ranking in sports and games by computing the rank diversity, a measure of the number of elements occupying a given rank over a length of time. From previous [12] and current work, it appears that rank diversity has the same functional form, not only for sports but also for other complex systems, such as countries classified by their economic complexity, the 500 leading enterprises ranked by Fortune magazine, or a set of millions of words in six Indo-European languages.

The rank diversity \(d(k)\) is defined as the number of distinct elements in a complex system that occupy the rank k at some point during a given length of time. In other words, we choose to focus on the time dependence of ranks, rather than on the static (i.e. defined for a single time) rank distribution \(f(k)\). An example of the change of ranks in time for the sports and games studied here can be seen in Figure 2. These so-called ‘spaghetti’ curves show how elements - individuals or teams - change their rank in time. The rank diversity \(d(k)\) is simply the normalized number of different elements (curves) that spend at least one time interval at a given rank k. The rank diversity for the various sports and games considered here is shown in Figure 3.

Figure 2
figure 2

Temporal evolution of player and team rankings. Plot showing the change in rank k across time t of all players/teams in each sport and game considered in this study: ATP, FIDE, OWGR, FIFA, FCWR, and GPI (clockwise, starting from upper left corner). For clarity, only some of the first 50 ranks (at all available time slices) are shown. Notice that players/teams in lower ranks tend to change less than in higher ones, even when rankings across activities change at varying rates and the associated time resolution moves from weeks to months (see Table 1).

Figure 3
figure 3

Rank diversity of sports and games. Plot showing the rank diversity \(d(k)\) for all datasets (blue dots), as well as the fit Φ (red lines). We include the values of μ, σ, maximum rank diversity \(d_{\max}\), and \(R^{2}\) as well.

We should stress that \(d(k)\) and \(f(k)\) measure different aspects of the hierarchical structure of a complex system. First of all, the rank diversity includes information on how elements change rank throughout time in a single function, while the rank distribution captures the hierarchy in the system for a single time interval. Secondly, the rank diversity disregards any information on the scores of elements beyond their order, and thus the same \(d(k)\) may be obtained for several shapes of \(f(k)\) (power-law, Gamma, Beta, etc.). As an example, consider any transformation in time of the scores of elements in the system, such that their ranking order stays the same; then \(f(k)\) could interpolate between different functional shapes as time goes on, while \(d(k)\) would stay constant. The inverse case is also possible, and any rank distribution may produce a wide variety of rank diversities. For example, we could construct several dynamics of scores that keep the number of elements with a given score constant, but that change the amount of time an element holds certain score, thus keeping \(f(k)\) fixed and changing \(d(k)\). Overall, both \(d(k)\) and \(f(k)\) measure some aspects of the structure and dynamics of hierarchy in a complex system, but only the rank diversity captures the way elements change their positions in the hierarchy, beyond minor changes in scores that could be attributed, for example, to different ways of measuring performance.

From Figure 3 we see that the empirical curves for rank diversity are (roughly) monotonic and have a single shoulder. The cumulative of a square-integrable function with a single bump would have these properties, and a Gaussian is arguably the simplest choice. Moreover, an analytical argument (see Appendix B) suggests that this may be an appropriate ansatz under very general conditions, at least qualitatively. In a large variety of physical systems composed of alike elements with similar interactions between them, the macroscopic response of the system is usually determined by general laws such as equations of state. However, in different empirical realisations of the same dynamics there may be differences associated to the law of the large numbers or the central limit theorem. These differences across realisations follow a normal Gaussian distribution, according to the Gaussian theory of errors. However, for complex systems with competitive dynamics, there may be generic features described by the Gamma (\(m_{2}\)) and Beta (\(m_{3}\)) distributions [31, 32], and there may also be differences across realisations that follow a multiplicative dynamics. This is indeed the case for several Indo-European languages [12] and for the games and sports datasets considered here (See Figure 1). In Appendix B we introduce the non-trivial idea that there are two different dynamics associated with so-called generic and contingent features, which may be described in terms of a one-step Markovian, Gaussian process. This allows us to establish an explicit relation between the diversity \(d(k)\) and the cumulative of the rank distribution, \(S(t)\).

In fact, studying \(d(k)\) for six Indo-European languages [12], we found that the observed rank diversity closely follows the cumulative of a Gaussian (i.e. a sigmoid)

$$ \Phi_{\mu,\sigma}(\log k)=\frac{\max_{i} d(k_{i})}{\sigma\sqrt {2\pi}} \int_{-\infty}^{\log k}\exp \biggl( -\frac{(y-\mu)^{2}}{2\sigma ^{2}} \biggr) \,d y. $$
(5)

The mean value μ is set as the smallest \(k_{0}\) for which \(d(k_{0})=\frac{\max_{ i } d(k_{i}) }{2} \), while the width σ is fitted and gives the scale for which \(d(k)\) gets close to its extreme values. If \(k_{\pm}\) are given by \(\log_{10}k_{\pm}=\mu\pm2\sigma\), the bulk of the changes in the values of diversity lies between \(k_{-}\) and \(k_{+}\). In Figure 3 we show the fit Φ for all sports and games considered here (\(R^{2}\) values for the Φ curves are shown there as well). We do not consider neither D nor p, since these measures are only meaningful for distributions, which \(d(k)\) is not. To compare different rank diversity curves, their rank can be normalised to \(\frac{\log(k)-\mu}{\sigma}\), as shown in Figure 4. Since all the cases considered can be fitted with the sigmoid curve of Eq. (5), we argue that the rank diversity of sports seems to have a generic shape.

Figure 4
figure 4

Similarity in the normalized rank diversity across sports and games. Plot showing a comparison of the rank diversity \(d(k)\) for all activities considered. With the values of μ and σ we obtained from the fit Φ, we have rescaled the abscissa. As reference we include the basic form of Eq. (5) (thick red line), with \(\mu=0\) and \(\sigma =1\). These results indicate that all activities have the same functional shape of rank diversity.

4.1 A random walk model

From Figure 2 and Figure 4 we see that players and teams with low ranks change very slowly or not at all, while those with higher k have a larger rank variation in time. This intuition is clear from recent experience in sports like tennis and football: According to the analysed datasets, Hewitt, Nadal, Roddick, Ferrero, Agassi and Federer have been the only number one tennis players from May 2003 till December 2010. The same holds for football clubs: Real Madrid, Atlético Madrid, Barcelona, and Bayern München have been the best-ranked teams from January 2012 till December 2014. In other words, players and teams with small k tend to have a small rank diversity.

In what follows we propose a simple model [12] that captures such intuition (i.e. a variation approximately proportional to the current rank), and whose rank diversity resembles the data presented here. We call this model a scale-invariant random Gaussian walk, since a member with rank \(k_{t}\), at the discrete time t, is converted to rank \(k_{t+1}\) according to the following procedure: We define an auxiliary variable \(l_{t+1}\), which we call pre-rank, at time \(t+1\) by the relation

$$ l_{t+1}=k_{t}+G(k_{t}\hat{ \sigma}), $$
(6)

where \(G(k_{t}\hat{\sigma})\) is a Gaussian-distributed random number with standard deviation \(k_{t}\hat{\sigma}\) and mean 0. This means that the random variable \(l_{t+1}\) has a width distribution proportional to \(k_{t}\), and thus will, for small \(k_{t}\), have small changes as well. Once the values of the pre-ranks \(l_{t+1}\) for all members are obtained, we order them according to their magnitude. This new order gives new rankings, i.e. the k values at time \(t+1\). The only parameter left in the model is the relative width σ̂, which we fit by using a least-squares method over a smoothed version of the empirical rank diversity. In Figure 5 we show the rank diversity for systems with the same number of elements as those of Figure 3, but generated with the random model. We see that these two sets of plots are qualitative similar, although clear differences reveal that the model is insufficient for a full quantitative agreement. The fact that both the empirical and simulated rank diversities have a sigmoid shape suggests that rank changes in real systems may be the result of a large number of multiplicative processes. We discuss some analytical ideas supporting this insight in Appendix B. However, the mismatch between model and data seen in Figure 5 shows that not all characterizing features of the empirical process are captured by our model, and further investigation is needed.

Figure 5
figure 5

Comparison between empirical and simulated rank diversities. Plot showing the rank diversity \(d(k)\) of the empirical data (blue shaded area) and of simulated data from our random walk model (yellow shaded area), as well as the fit Φ (red/green lines for empirical/simulated data, respectively). We also include the values of μ, σ, and maximum rank diversity \(d_{max}\) for the simulated data. The random walk model manages to qualitatively reproduce the rank diversity seen in all sports and games considered here, although clear differences reveal that the model is insufficient for a full quantitative agreement.

5 Discussion and conclusions

Competition and heterogeneous performance are characteristic of the elements of many complex systems in biological, social and economic settings. Despite the fact that these systems show a large variation in the definitions of their constituents and in the relevant interactions between them, it remains to be seen whether the emergence of hierarchical structure is mostly determined by the particularities of each phenomenon, or if there are mechanisms of stratification common to the temporal evolution of many systems. We have explored this notion by considering a set of relatively controlled and simplified systems driven by competition: Human sports and games, where the rules of engagement and measures of performance are well defined, in contrast to, say, the ranking of physicists (the question of whom is the ‘best’ physicist would have an ambiguous answer, to say the least). This allows us to characterise the emergence of hierarchical heterogeneity by comparing the temporal features of rankings of individuals and teams across activities in a clear way. Explicitly, we analysed the statistical properties of rank distributions in six sports and games, each with different number of members and rules for calculating scores (and, therefore, ranks). By comparing rank distributions with several ranking models, we find that the Zipf law (model \(m_{1}\)) does not provide a suitable fit for the empirical data. Even if the more generic ranking model \(m_{4}\) (a combination of the Gamma and Beta distributions) tends to offer good fits, it is not always the best.

Furthermore, we studied the temporal features of rankings explicitly by calculating the rank diversity \(d(k)\), a measure of the number of individuals or teams occupying a given rank over a length of time. We found that \(d(k)\) has the same sigmoid-like functional form, even for relatively small systems like FIFA (with only 150 elements per time slice). Coupled to the fact that a sigmoid rank diversity has also been found in the way vocabulary changes in time [12], our results suggest that the emergence of hierarchical complexity - as measured by \(d(k)\) - may have traits common to many systems. This claim is underlined by the fact that a simple model (the scale-invariant random Gaussian walk) can reproduce the diversity of the sports and games studied here, and also of languages [12]. One could initially suspect that rank changes depend on the intrinsic strength or qualities of players and teams. However, given the fact that our random walk model reproduces relatively well the rank dynamics of several sports and games, it seems that rank change can instead be characterised as a random process. This does not imply that rank change is random, but that the specific mechanisms associated with each activity and ranking system are irrelevant for the calculation of rank diversity.

A natural direction to follow in the near future is to study the behaviour of rank diversity in other competitive phenomena beyond sporting activities and language, such as physical, social and economic processes of stratification. If indeed a certain universality in the temporal features of rankings is present in other complex settings, it would indicate that hierarchical phenomena may be driven by the same underlying mechanisms of rank formation, regardless of the nature of their components. Potentially, we may exploit such regularities to predict lifetimes of rank occupancy, thus increasing our ability to forecast stratification in the presence of competition.