Quantifying the Unexpected: a scientific approach to Black Swans

Many natural and socio-economic systems are characterized by power-law distributions that make the occurrence of extreme events not negligible. Such events are sometimes referred to as Black Swans, but a quantitative definition of a Black Swan is still lacking. Here, by leveraging on the properties of Zipf-Mandelbrot law, we investigate the relations between such extreme events and the dynamics of the upper cutoff of the inherent distribution. This approach permits a quantification of extreme events and allows to classify them as White, Grey, or Black Swans. Our criterion is in accordance with some previous findings, but also allows us to spot new examples of Black Swans, such as Lionel Messi and the Turkish Airline Flight 981 disaster. The systematic and quantitative methodology we developed allows a scientific and immediate categorization of rare events, providing also new insight into the generative mechanism behind Black Swans.


I. INTRODUCTION
During the last decade the complexity paradigm [1][2][3] has been successfully applied not only to the area of physical systems but also to many other phenomena, including socio-economic systems [4,5]. One of the most ubiquitous features in the complexity science is the emergence of extreme events, orders of magnitude larger than the typical ones. Severe financial crisis, devastating earthquakes, or deadly wars, all can be interpreted in terms of complex inherent structures which give rise to power law distributed phenomena [6]. Mandelbrot and Taleb have been among the firsts [7,8] to investigate these phenomena and to stress the limits of standard statistical techniques in such framework, the latter with the introduction of the celebrated Black Swan metaphor. According to Taleb [8] a Black Swan event: • is unexpected and unpredictable; • has a great impact, both positive or negative; • makes people try to explain its occurrence once it has been observed.
If extreme event are found to follow a power law their effects are in some way mitigated because they stop to be totally unexpected. In this case Taleb speaks of Gray Swans [8], which are unpredictable but not unexpected. However, as we are going to show, even if we know that the underlying distribution is power law-like, Black Swans can still occur due to the possible dynamics of the upper cutoff. The First World War and 9/11 terrorist attacks are often used as examples of Black Swans [8][9][10][11]; however, up to now a scientific and quantitative assessment of Black Swans has been lacking and this sometimes allows policy makers to improperly use this terminology. For instance, during the last months many governments, financial institutions and journals identified the COVID-19 pandemic as a Black Swan, even though the possibility of the spreading of a newborn virus had been already pointed out by several studies and even by Taleb himself [8]. This arbitrariness is favored by the fact that after the efforts of Taleb and Mandelbrot, most of the discussion about Black Swans is still conducted on a qualitative philosophical/psychological level.
In the following we show, on a quantitative basis, that Black Swans are related to a non-stationarity in the inherent power law distribution, generated by a jump dynamics of the upper cutoff. This implies that when performing risk analysis, the assumption of a time independent probability distribution may result in severe underestimations of extreme events. A central property of Black Swans is that they can not be predicted starting from data about the system under consideration, however, an analysis including also the environment the system is coupled to permits, in some cases, to spot the jumps of the upper cutoff, and so to foresee Black Swans. This new perspective allow us to introduce a quantitative measure of the surprise associated to large events, that we call Blackness, which can be used to scientifically classify them into three distinct sets: White Swans, Grey Swans, and Black Swans. Our quantitative criterion partly confirms what previously stated by Taleb using qualitative arguments, namely that the First World War and 9/11 terrorist attacks have been Black Swans with respect to the number of casualties, while 1987 Black Monday has been only a Grey Swan. New examples of Black Swans we find are the amount of goals scored by Lionel Messi in LaLiga and the number of casualties of Turkish Airline Flight 981 disaster, since both events drastically overcame the previous estimate of the upper cutoff.

A. Zipf-Mandelbrot law
Our scientific framework to analyze Black Swans is given by Zipf's law and, more in general, power laws. Zipf's law [12] is an ubiquitous scaling law found in many natural and socio-economical systems [6,[13][14][15][16]. Given a system arXiv:2201.12042v1 [physics.soc-ph] 28 Jan 2022  composed of N objects and denoting by S(k) the size of the kth largest one, Zipf's law reads where k is the rank, γ is the Zipf's exponent, and S(1) is the empirical maximum, that is the largest element or event in the system under consideration. Zipf's law is generally visualized by the so called rank-size plot, obtained plotting the ordered sequence of the sizes as function of their position in the sequence; a straight line in loglog scale is thus expected. However, it is common to observe deviations from Zipf's law at low ranks [17][18][19], which can be quantified by introducing a parameter Q in the so called Zipf-Mandelbrot law [20]: The parameter Q > 0 will play a crucial role in the analysis of Black Swans. As shown in [17], the Zipf-Mandelbrot law is observed whenever the inherent distribution is a power law and its parameters are related to those of the probability distribution by the following relations where • α is the exponent of the inherent power law distribution, that is P (S) ∼ S −α ; • s m and s M are the lower and upper cutoffs of the distribution, possibly corresponding to physical limits, that is P (S) = 0 for S < s m and S > s M ; • N is the number of elements in the system or records in the catalog.
The deviation parameter Q is a measure of the level of sampling [17] (see Methods for details): for Q ≈ 0 the underlying distribution is under-sampled and the upper cutoff can not be inferred, while for Q 1 it is completely sampled and s M coincides with the empirical maximum. Indeed by combining Eqs. (2) and (3) we obtain an expression relating the upper cutoff of the distribution to the measurable parameters Q, S(1) and γ In the limit Q → 0 the upper cutoff diverges, meaning that data do not provide a sufficient level of sampling for inferring it. This last expression thus allows, when Q is sufficiently large, to compute the upper cutoff of a power law distribution and will be used in the following to study real systems.

B. The Blackness
Let us consider a random number generator extracting values from a power law distribution with unknown parameters α, s m and s M . If we look at the first N Figure 2: Blackness. Blackness of ten events with 90% confidence bounds. Here the threshold for an event to be considered a Black Swan is β > 1; only four events out of the ten we considered are Black Swans (Turkish Airlines disaster, Lionel Messi, 9/11 terrorist attacks and World War One), while the remaining six are Grey Swans. These results have been obtained by mean of Eq. (6); see Methods for details.
(s M /s m ) 1/γ numbers, being Q 1, the corresponding rank-size plot will be straight [17]. Moreover, our set under-samples the inherent distribution, and so there would be no surprise if the next draw returns a value much larger than those previously observed, because it is not possible to infer the upper cutoff s M .
If we keep drawing numbers, sooner or later we will completely sample the inherent distribution, this occurring for N (s M /s m ) 1/γ . In this way, the empirical maximum becomes very close to the upper cutoff, that can thus be inferred using Eq. (4), and nothing unexpected should occur. In this situation Black Swans are absent, but what happens if the upper cutoff increases to s M s M ? (Note that this actually happens in various social and biological systems, for instance as a consequence of the coupling with an external system or a technological change). The answer is simple, our apparently perfect knowledge of the underlying distribution becomes problematic as soon as a number close to s M is extracted. Without knowing if and when the upper cutoff jumps, there is no way not only to predict, but also to expect such an event. This kind of event is what we will classify as a Black Swan.
This simple example we sketched captures some points that are crucial for understanding the phenomenology of Black Swans (and possibly mitigate their utmost effects): • an arbitrary large event can be or be not a Black Swan depending on the level of sampling of the distribution, so depending on the value of Q. A system showing pure Zipf's law (Q ≈ 0) never gives rise to Black Swans. The idea is that when the level of sampling is low there is no way to characterize the upper limit and so to realize that s M → s M .
• an event can be classified as a Black Swan if and only if it is (much) larger than any event previously observed and the deviation parameter Q of the system is large. Indeed, this implies that it is beyond the estimate of the upper limit; • a stationary power law only gives rise to Grey Swans, since when the level of sampling is low there is no surprise if an event much larger than those previously observed occurs, while when the level of sampling is high no event much larger than the observed maximum can occur. Note that for a power law without upper cutoff, the level of sampling is always low, since the support of the distribution is not finite. As a consequence, also in this case, no Black Swan can be observed.
In order to better clarify these points, we consider a real system showing this kind of dynamics: aircraft accidents.
Here the size of the event is given by the number of casualties. In Fig. 1a we show the corresponding rank size plot computed by considering all events until the 02-03-1974, the day before the crash of the Turkish Airline Flight 981, which is represented by the Black Swan. Strong deviations from Zipf's law are present, and Q is relatively large. On the basis of the previous considerations, one could have concluded that the upper cutoff of the distribution had already been reached, and so no surprise should have been expected. However, the day after, the Flight 981 crashed, provoking the death of 346 people, a number approximately twice as large as the previous most severe accident. This increase was possible because of the introduction in the late sixties of wide-body aircrafts, that can carry approximately twice as many passengers as the older narrow-body models. This implied a sudden increase of the upper cutoff of the casualties distribution, that we depict in Fig. 1b. In this sense we can conclude that the Flight 981 was indeed a Black Swan. Note that, before and after the jump, the scaling exponent remained the same.
In summary, usually an empirical power law is characterized by three parameters, the exponent and the two cutoffs, and it must be non stationary in order to give rise to Black Swans. Now, the lower cutoff clearly does not play any role regarding large events, while a variation of the exponent influences the frequency of extreme events, but not their size. As a consequence, the only form of non-stationarity that may produce Black Swans is a jump of the upper cutoff.
Once the phenomenology of extreme events has been discussed, it is simple to derive a quantitative criterion to classify them in Black, Gray, and White Swans: i) an event smaller than the maximum of those previously occurred is a White Swan; ii) a Gray Swan is an event whose size is larger than those previously observed, but that is not unexpected in the sense that it is lower than the estimated upper cutoff; iii) a Black Swan is an event whose size is larger than those previously observed and that is also unexpected, being larger than the expected upper cutoff. We can then define the Blackness β of a new event of size S new as where S(1) is the empirical maximum and s M is the best estimate of the upper cutoff we can infer from the data, that is given by Eq. (4). Formalizing the three definitions just mentioned, β can be used to determine the "color" of an extreme event: As shown in the methods section, β can be expressed directly in terms of only empirical quantities where R = S new /S(1) is the relative size of the new event with respect to the empirical maximum. This last expression shows that β well summarizes the two crucial points we stressed above. Namely R > 1 is a necessary but not sufficient condition for an event to be a Black Swan, since also the deviation parameter Q (or, equivalently, the level of sampling) must be considered. Indeed if Q = 0, that is for a perfect Zipf's law, the Blackness goes to zero independently of the relative size. This because in the case of a pure Zipf's law the upper cutoff can not be estimated.
C. Applications to real systems

Classification of past events
The Blackness concept allows to search for Black or Gray swans in any system showing an inherent power law distribution, obtaining an objective and scientific based measure of the "surprise" associated to an event. By performing fits to the rank-size plots (see the Method section for details), and by using Eq. (6), we computed the Blackness of a number of extreme events that previous works have found to be power law distributed [7,[21][22][23][24][25] and that range from sport to natural disasters and finance; the results are displayed in Fig. 2. The "Blackest" Black Swan among the events we considered is Turkish Airline disaster, followed by WWI; the size of the latter has been defined as the number of casualties normalized by the world population. For what concerns the WWI, the growing globalization of the world and the extensive usage of new deadly weapons may be the responsible of the jump of the upper cutoff. Surprisingly WWII is only a Grey Swan. Intuitively, the occurrence of the Great War, a conflict much more severe than any previous interstate-war, already proved that the upper cutoff of the distribution had increased, making the second world conflict relatively less surprising in terms of casualties. Another Swan that presents a Blackness lower than one (considering uncertainty) is the 1987 Black Monday. Here the size is given by the module of Dow Jones index daily return; during the Black Monday this index lost about 23% of its value, the worst fall in its history. Also other "officially unexpected" events in finance and economics are found to be Grey Swans: the oil market volatility due to the spreading of Covid-19 (the event we analyzed is the largest monthly fluctuation of West Texas Intermediate (WTI) index (+75%, occurred between March and April 2020). We considered pre-Covid19 data (1986-2019) and the growth of China (the size is defined as the percentage variation of GDPppp and we considered 35 years returns of countries between the periods 1865-1900, 1900-1935, and 1950-1985. Countries that grew thanks to oil or natural resources have been excluded, but analogous results are found also considering all the countries). It is interesting to note that according to the common wisdom the growth of China is an incredible outlier [26], while in our framework its growth is a remarkable but not unexpected event, confirming recent analysis based on the methods of analogues [5,27]. Conversely, the soccer top star Lionel Messi is a Black Swan if measured by the number of goals he scored in LaLiga (455). We can argue that the growth of the upper cutoff is due to the increase of the number of teams taking part in the championships, which, in turn, increased the number of games played in a season and the number of potential goals. Indeed, the previous record holder was Telmo Zarra, who scored 268 goals playing between 1949 and 1957; even if, as Lionel Messi, he scored an average of 0.9 goals per match and played for the same number of seasons (16), the number of teams involved in LaLiga was between 12 and 16, against the 20 of today. Using the same criterion Cristiano Ronaldo, with his 311 goals, is only a Grey Swan. The September 11 attacks, often used as an archetype of Black Swan events, is characterized by a Blackness much larger than one, confirming the blackness of this terrorist attack in terms of casualties, even if in this case a clear and objective motivation for the jump of the upper cutoff is hard to find. Finally, the Burj Khalifa, that is the tallest building in the world, is only a Grey Swan, despite an height approximately 70% larger than Taipei 101, the previous record holder. Setting β = 1 in Eq. (6) we can obtain a threshold value Figure 3: Swans Plane. Visualization in the Swans plane of the outcomes of a truncated stationary power law with α = 1.5, s m = 1 and s M = 10 6 (color map) and of the four Black Swans we identified (white dots). Concerning the stationary power law, the figure shows the frequency of events with R > 1, obtained exploiting a binning procedure in the Swans plane; lighter colors correspond to higher frequencies. The white curve corresponds to the threshold β = 1 and divides Grey Swans and Black Swans. As expected, the frequency goes to zero above the curve, proving that a stationary power law only produces Grey Swans. Note that as expected all the four Black Swans reside in a region of the Swans Plane where the frequency of power law events is vanishing, so they can not be explained by a stationary power law.
R th for the relative size dividing Black from Grey Swans: which once again can expressed in terms of only empirical quantities and coincides with the ratio between the estimate of the upper cutoff and the empirical maximum.
In this way we can now define the Swans plane Q − R 1/γ (Fig. 3), since only these two quantities are needed to determine the nature of an extreme event. Three areas can be identified: the White Swans region (R 1/γ < 1, if the event has a size less than the already seen maximum S(1)), the Grey Swans region (1 < R < Q+1 Q , a size higher than the maximum, but not surprising given the upper cutoff estimation) and the Black Swans region (R > Q+1 Q , higher than both the maximum and the upper cutoff and so, in this sense, surprising). Note that the trivial White Swan region is not represented in the figure. As discussed above, stationary power laws are not expected to produce Black Swans, being such events related to an abrupt non stationarity of the upper cutoff. This is confirmed by Fig. 3, where we exploited the Swans plane to visualize the outcomes of a stationary truncated power law. More precisely we generated N i = 100 numbers from a stationary truncated power law with parameters α = 1.5, s m = 1 and s M = 10 6 , so that the initial deviation parameter is Q i = 0.1, and then we extracted other N f = 10 5 numbers, so to arrive to a final deviations parameter Q f = 100. At each draw we checked if the newcomer has been larger than the previously observed numbers. If this was the case, we fitted the sample available before the new extraction occurred with Zipf-Mandelbrot law, determining the value of Q; the full procedure has been repeated 10 3 times. Brighter colors correspond to a larger frequency and, as expected, frequencies go to zero out of the Grey Swan region delimited by the white curve corresponding to β = 1. In the same figure we also plotted the four Black Swans we identified, as it is possible to see they all reside in a region of the Swans Plane where the stationary power law produces no events and so they are not compatible with a stationary power law.

Future Black Swans
By using our estimation of the upper cutoff, given by Eq. (4), we can estimate the size of a newcomer event to be a Black Swan. We computed the upper cutoff of five social and natural systems and, in turn, the minimum size for new events to be Black Swans. We show our results in Table I. It results that a pandemic should kill more than 5 billion people -i.e. approximately 40 times the Black Death, the worst pandemic ever with its 200 millions deaths -for being considered a Black Swan. This stems from the fact that only few pandemics have been recorded during human history and so the inherent distribution is not much sampled. Conversely, the distributions of wildfires occurred in Alberta (CA) and Italian earthquakes are characterized by an high level of sampling. Indeed a wildfire should be just 1.54 times larger than the observed maximum 1 for being classified as a Black Swan, while an earthquake should

III. DISCUSSION
In this work we exploit the connections among the Zipf-Mandelbrot law, the inherent power law, and the level of sampling, discussed in [17], to obtain a relation to derive an empirical estimation of the upper cutoff of a power law distribution. We define Black Swans as events whose size is both extreme (i.e., larger than the observed maximum) and unexpected (i.e., larger than the estimated cutoff). We show that three ingredients are needed to produce Black Swans: an inherent truncated power law distribution, an high level of sampling, and a jump dynamics of the upper cutoff. Turkish Airline Flight 981 is a clear-cut example where such a dynamics is particularly evident, since the jump of the upper cutoff has been provoked by a well defined technological advance, the introduction of large body aircrafts. As a consequence, looking only at data regarding a certain system, may result in ignoring the jump of the upper cutoff, not allowing to foresee the possibility of a Black Swan. When performing risk assessment it is instead crucial to analyze also the context the systems lives in, since jumps can be provoked by eternal factors rather than by the laws governing the system itself, and not to rely on the assumption of a stationary probability distribution. We also introduced a quantitative and scientific measure of very large events, the Blackness, which allows to divide them in White, Grey, and Black Swans. Using this parameter, which depends on empirical quantities only, we checked that stationary power laws only produce Grey Swans and we analyzed several empirical systems in search of Black Swans. We found out that our criterion is in line with most of the qualitative findings of Taleb, since it correctly classifies the World War I and 9/11 terrorist attacks as Black Swans, while the 1987 Black Monday is classified only as a Grey Swan. We also spotted new examples of Black Swans, such as Turkish Airline disaster and number of goals scored by Lionel Messi. The latter probably connected to an increase of the number of teams involved in LaLiga championship. Finally, we determined how large should various events be in order to be classified as Black Swan by estimating the upper cutoff of their inherent power law distributions. For instance, in the case of Italian earthquakes the distribution is highly sampled, and so an earthquake releasing just 1.23 times the energy of the largest earthquake ever recorded would be a Black Swan. Conversely, the distribution of Dow Jones index daily returns is undersampled and so any fluctuation, no matter how much large, would be only an unsurprising Grey Swan. We believe that the introduction of a quantitative criterion to classify extreme events in Black Swans (or not) can be extremely useful not only from a scientific point of view, but also to scientifically ground the discussion among public opinion, academia, and policy makers.

Analytical results
As done in [17], let us consider a truncated power law distribution of sizes, P (S), that is where c is the normalization constant, and s m and s M respectively correspond to the natural lower and upper cutoffs, always present in real systems. These cutoffs are connected to c by the normalization condition We can then express the rank-size relation as a function of the PDF parameters using the fact that given the PDF P (S) of a continuous variable S, the values of its Cumulative Distribution Function (CDF) C(S), associated to the different values of S, are approximately equiprobable. In fact if P (s) is the PDF of the variable S defined in the interval [s m , s M ], then C(S) = S sm ds P (s ). By performing the change of variables from S to C = C(S), and calling f (C) its PDF, we get by definition of PDF and CDF f (C) = dS(C) dC P (S)| S=S(C) = 1 for 0 ≤ C ≤ 1. This implies that, given N values of S independently extracted from P (S), with good approximation they can be taken as uniformly spaced in the corresponding variable C. Thus, the k th size ranked value S(k) approximately corresponds to the CDF value N +1−k N +1 . In formulas which, together to Eq. (9), gives By assuming N + 1 ≈ N , s M s m , and introducing γ = By comparing this expression with Zipf-Mandelbrot law, that is we obtain These expressions relate the number of values/objects and the parameters of the PDF P (S) on one side, and the Zipf-Mandelbrot parameters on the other. Note that Q not only quantifies deviations from Zipf's law, but also quantifies the level of sampling of the inherent distribution. Indeed Q is: • the larger the wider is the statistical sample, so the larger is the numerosity of the sample N ; • the smaller the wider is the extension of the truncated power law, given by the ratio between the upper cutoff and the lower one.
It is possible to derive an expression connecting the upper cutoff of the distribution to the deviation parameter Q, Zipf's exponent γ and the empirical maximum S(1). Combining Eqs. (10) and (11) As expected for Q → ∞ the empirical maximum S(1) coincides with the upper cutoff and consequently any event larger than S(1) is a surprise, while for Q → 0 no event can be surprising since the upper cutoff is diverging. Again we see that Q plays the role of level of sampling quantifier, since the truncation point (the upper cutoff), can be appreciated only if Q is sufficiently large. Exploiting Eq. (12) we can rewrite the Blackness β = (S new − S(1))/(s M − S(1)) of an event with size S new as where R = S new /S(1) is the ratio between the size of the new event and the empirical maximum. Since the new event is a Black Swan if its size is larger than the estimate of the upper cutoff the threshold R th dividing Grey and Black Swans is In these terms we can restate the criterion introduced in the main text terms of three empirical quantities: the deviation parameter Q, Zipf's exponent γ and the ratio R = S(1)/s M . More precisely Note that the threshold ratio R th = R th (Q, γ): i) diverges if Q goes to zero; ii) tends to one for Q going to infinity; iii) is increasing with γ = 1/(α − 1), so it is the larger the fatter is the inherent distribution.

Databases
All the database we used in our analysis are freely accessible on the web, details can be found below.
• GDPppp of countries In order to study the growth of countries so to determine if the growth of China has been a Black Swan, we used Maddison database [28], available here, which provides GDP PPP of countries from 1 AD to 2008. We integrated it with IMF data to obtain a database which ranges from 1900 to 2020.
• Airplane disasters The analysis of airplanes disasters has been performed exploiting a dataset from Kaggle.com containing data of airplane accidents involving civil, commercial and military transport worldwide from 1908-09-17 to 2009-06-08. Such dataset is available here.
• WTI returns The monthly returns of West Texas Intermediate Oil can be accessed from different sources, we used a dataset ranging from 1986 to 2020 that can be found here.
• Tallest buildings The list of the tallest buildings before Burj Khalifa, so before 2010, has been generated from skyscrapercenter.com • LaLiga top scorers The list of LaLiga top scorers has been retrieved from transfermarkt.com. We considered only seasons between 1928/1929 and 2004/2005, so before the blow up of Messi and Ronaldo.
• Down Jones index returns Historical daily returns of Dow Jones index from 1986 to 2016 have been downloaded from Quandl.com and can be found here. Data from 2016 to present days have been retrieved for finance.yahoo.com.
• Terrorist Attacks The analysis of casualties provoked by terrorist attacks has been performed using the RAND Database of Worldwide Terrorism Incidents (RDWTI) that is accessible here.
• Interstate Wars Data on Inter-State wars have been taken from The Correlates of War (COW) Project [29].
• Pandemics Regarding pandemics, we exploited the average estimate of the number of casualties described in [23].
• Wildfires The analysis of wildfires is based on Alberta Wildfire datasets. More precisely we merged the four databases available here, obtaining a dataset spanning spanning the period 1961-2018.
• Italian Earthquakes For our analysis of the Italian earthquakes we used the INGV Parametric Catalogue of Italian Earthquakes, which "provides homogeneous macroseismic and instrumental data and parameters for Italian earthquakes with maximum intensity ≥ 5 or magnitude ≥ 4.0 in the period 1000-2017" [30].

Fitting procedure and confidence bounds estimation
We adopted a standard non linear least squares (NLS) fitting procedure to determine the parameters of Zipf-Mandelbrot law. The accuracy of this tecnique, when applied to the rank-size plot or to the complementary cumulative distribution, is comparable to maximum likelihood estimates [31], while being much simpler (in the case of unknown upper cutoff). In particular, we used Eq. (2) partially linearized through logarithms log S(k) = −γ ln(k + Q) + c, where Q, γ and c are free parameters. All the systems we considered have already been widely studied and there is strong evidence on the presence of an underlying power law distribution, nevertheless we exploited the p-value to check the goodness of our fits. We followed the procedure described in [21], namely:  Table II: p-value. Number of elements considered and p-value for the systems we analyzed. All the p-values are above the threshold of 0.1, meaning that all these systems are well described by a power law distribution.
1. we compute the parameter Q and γ of the empirical data with the NLS; 2. we use Eq. (3) to determine the parameters of the underlying power law distribution. Note that N and s m are given, respectively, by the number of elements in the sample and by the size of the smallest object; 3. we compute the Kolmogorov-Smirnov distance between the empirical data and the power law; 4. we generate M = 1000 Monte Carlo samples (each with the same numerosity N of the empirical sample) from the inferred power law distribution and, for each of them, we repeat steps from 1 to 3 so to determine the statistics of the Kolmogorov-Smirnov distance; 5. the p-value is defined as the fraction of the Monte Carlo samples whose Kolmogorov-Smirnov distance is larger than that of the empirical data.
Following [21] power law hypothesis is rejected if the pvalue is smaller than 0.1. All the p-values for the systems we analyzed are reported in Tab. I, as it is possible to see all values are above the threshold 0.1, meaning that, as previously noticed, all the systems considered are well described by an underlying power law distribution. Note, however, that in some systems, as in the case of pandemics, only a limited number of elements is available and so the parameters estimated by the fitting procedure may be not very precise. In order to take into account this fact, as explained below, we perform a parametric bootstrap which allows us to include in the uncertainty over the parameters also the effect of the low numerosity. Once the parameters Q and γ have been obtained, the Blackness β can be computed exploiting Eq. (6), however determining the uncertainty of such quantity is not trivial. Naively one could propagate on β the uncertainty on Q and γ, σ Q and σ γ returned by the NLS fitting method. However this methods does not takes into account statistical fluctuations that are encountered considering different samples generated by the same power law distribution. For this reason we exploited a parametric bootstrap so to obtain a more realistic measure of uncertainty. In particular the procedure we adopted is the following • we compute the parameter Q and γ of the empirical data with the NLS and we use them to obtain the Blackness β; • we use Eq. (3) to determine the parameters of the underlying power law distribution; • we generate M = 1000 Monte Carlo samples with numerosity N as the empirical sample using the power law distribution obtained in the previous step; • each synthetic sample m is fitted with the NLS technique, so to obtain the parameters Q m and γ m and their standard deviation σ Q m and σ γ m . These quantities are used to determine the Blackness of the event under analysis with respect to the synthetic sample, β m , whose uncertainty is obtained propagating σ Q m and σ γ m • the distribution of β, P (β), is obtained as a mixture of M Gaussians with parameters β m and σ β m where N (x, y) is a Gaussian with mean x and variance y 2 ; • starting from the probability distribution P (β), the confidence bound for β is easily obtained using the cumulative distribution and determining the interval containing 90% of the probability.