# Talk:Power law/Revised article

A power law is any polynomial relationship that exhibits the property of scale invariance. The most common power laws relate two variables and have the form

${\displaystyle f(x)=ax^{k}\!+o(x^{k})}$

where ${\displaystyle a}$ and ${\displaystyle k}$ are constants, and ${\displaystyle o(x^{k})}$ is an asymptotically small function of ${\displaystyle x}$. Here, ${\displaystyle k}$ is typically called the scaling exponent, denoting the fact that a power-law function (or, more generally, a ${\displaystyle k}$th order homogeneous polynomial) satisfies the criteria ${\displaystyle f(cx)\propto f(x)}$ where ${\displaystyle c}$ is a constant. That is, scaling the function's argument changes the constant of proportionality as a function of the scale change, but preserves the shape of the function itself. This relationship becomes more clear if we take the logarithm of both sides (or, graphically, plotting on a log-log graph)

${\displaystyle \log \left(f(x)\right)=k\log x+\log a}$ .

Notice that this expression has the form of a linear relationship with slope ${\displaystyle k}$., and scaling the argument induces a linear shift (up or down) of the function, and leaves both the form and slope ${\displaystyle k}$ unchanged.

Power-law relations characterize a staggering number of natural patterns, and it is primarily in this context that the term power law is used rather than polynomial function. For instance, inverse-square laws, such as gravitation and the Coulomb force are power laws, as are many common mathematical formulae such as the quadratic law of area of the circle. Also, many probability distributions have tails that asymptotically follow power-law relations, a topic that connects tightly with the theory of large deviations (also called extreme value theory), which considers the frequency of extremely rare events like stock market crashes, and large natural disasters.

Scientific interest in power law relations, whether functions or distributions, comes primarily from the ease with which certain general classes of mechanisms can generate them. That is, the observation of a power-law relation in data often points to specific kinds of mechanisms that underly the natural phenomenon in question, and can often indicate a deep connection with other, seemingly unrelated systems (for instance, see both the reference by Simon and the subsection on universality below). The ubiquity of power-law relations in physics is partly due to dimensional constraints, while in complex systems, power laws are often thought to be signatures of hierarchy and robustness. A few notable examples of power laws are the Gutenberg-Richter law for earthquake sizes, or structural self-similarity of fractals, and scaling laws in biological systems. Research on the origins of power-law relations, and efforts to observe and validate them in the real world, is extremely active in many fields of modern science, including physics, computer science, linguistics, geophysics, sociology, economics and more.

## Properties of power laws

### Scale invariance

The main property of power laws that makes them interesting is their scale invariance. Given a relation ${\displaystyle f(x)=ax^{k}}$, or, indeed any homogeneous polynomial, scaling the argument ${\displaystyle x}$ by a constant factor causes only a proportionate scaling of the function itself. That is,

${\displaystyle f(cx)=a(cx)^{k}=c^{k}f(x)\propto f(x)\!}$.

That is, scaling by a constant simply multiplies the original power-law relation by the constant ${\displaystyle c^{k}}$. Thus, it follows that all power laws with a particular scaling exponent are equivalent up to constant factors, since each is simply a scaled version of the others. This behavior is what produces the linear relationship when both logarithms are taken of both ${\displaystyle f(x)}$ and ${\displaystyle x}$, and the straight-line on the log-log plot is often called the signature of a power law. Notably, however, with real data, such straightness is necessary, but not a sufficient condition for the data following a power-law relation. In fact, there are many ways to generate finite amounts of data that mimic this signature behavior, but, in their asymptotic limit, are not true power laws. Thus, accurately fitting and validating power-law models is an active area of research in statistics.

### Universality

The equivalence of power laws with a particular scaling exponent can have a deeper origin in the dynamical processes that generate the power-law relation. In physics, for example, phase transitions in thermodynamic systems are associated with the emergence of power-law distributions of certain quantities, whose exponents are referred to as the critical exponents of the system. Diverse systems with the same critical exponents — that is, which display identical scaling behaviour as they approach criticality — can be shown, via renormalization group theory, to share the same fundamental dynamics. For instance, the behavior of water and CO2 at their boiling points fall in the same universality class because they have identical critical exponents. In fact, almost all material phase transitions are described by a small set of universality classes. Similar observations have been made, though not as comprehensively, for various self-organized critical systems, where the critical point of the system is an attractor. Formally, this sharing of dynamics is referred to as universality, and systems with precisely the same critical exponents are said to belong to the same universality class.

## Power-law functions

The general power-law function follows the polynomial form given above, and is a ubiquitous form throughout mathematics and science. Notably, however, not all polynomial functions are power laws because not all polynomials exhibit the property of scale invariance. Typically, power-law functions are polynomials in a single variable, and are explicitly used to model the scaling behavior of natural processes. For instance, allometric scaling laws for the relation of biological variables are some of the best known power-law functions in nature. In this context, the ${\displaystyle o(x^{k})}$ term is most typically replaced by a deviation term ${\displaystyle \epsilon }$, which can represent uncertainty in the observed values (perhaps measurement or sampling errors) or provide a simple way for observations to deviate from the no power-law function (perhaps for stochastic reasons):

${\displaystyle y=ax^{k}+\epsilon \!}$.

### Estimating the exponent from empirical data

There are many methods for fitting power-law functions to data, and the best option typically depends strongly on the kind of question being asked. For instance, prediction-type questions should rely on nonlinear regression, while descriptive-type summary questions, such as those found in allometry, should use a method that allows for uncertainty in both the ${\displaystyle x}$ and ${\displaystyle y}$ measurements. In either case, a simple least-squares linear regression on log-transformed data should be avoided for several reasons, not the least of which is that the logarithmic transformation produces residuals that are log-normally distributed. In this latter context, the method of standardized major axis (SMA) regression (sometimes called reduced major axis, but this term should be avoided) is preferred.

The major axis is the linear equation that minimizes the sum of squares of the shortest (perpendicular) distance between data points and the equation. This axis is equivalent to the first principal component axis of the covariance matrix. From this observation, the estimator for the slope can be derived

${\displaystyle {\hat {k}}={\frac {\sigma _{y}}{\sigma _{x}}}={\sqrt {\frac {\sum _{i=1}^{N}(y_{i}-\mu _{y})^{2}}{\sum _{i=1}^{N}(x_{i}-\mu _{x})^{2}}}}}$

where ${\displaystyle \mu _{x}}$ and ${\displaystyle \mu _{y}}$ are the sample means of the ${\displaystyle x}$ and ${\displaystyle y}$ data, respectively.

More about this method, and the conditions under which it can be used, can be found in the Warton reference below. Further, Warton's comprehensive review article also provides usable code (C++, R, and Matlab) for estimation and testing routines for power-law functions.

## Power-law distributions

A power-law distribution is any that, in the most general sense, has the form

${\displaystyle p(x)\propto L(x)x^{-\alpha }}$

where ${\displaystyle \alpha >1}$, and ${\displaystyle L(x)}$ is a slowly varying function, which is any function that satisfies ${\displaystyle \lim _{x\rightarrow \infty }L(t\,x)/L(x)=1}$ with ${\displaystyle t}$ constant. This property of ${\displaystyle L(x)}$ follows directly from the requirement that ${\displaystyle p(x)}$ be asymptotically scale invariant; thus, the form of ${\displaystyle L(x)}$ only controls the shape and finite extent of the lower tail. For instance, if ${\displaystyle L(x)}$ is the constant function, then we have a power-law that holds for all values of ${\displaystyle x}$. In many cases, it is convenient to assume a lower bound ${\displaystyle x_{\mathrm {min} }}$ from which the law holds. Combining these two cases, and where ${\displaystyle x}$ is a continuous variable, the power law has the form

${\displaystyle p(x)={\frac {\alpha -1}{x_{\mathrm {min} }}}\left({\frac {x}{x_{\mathrm {min} }}}\right)^{-\alpha }}$,

where the constant is necessary to guarantee that the distributions is properly normalized. Briefly, we can consider several properties of this distribution.

In general, the moments of this distribution are given by

${\displaystyle \langle x^{m}\rangle =\int _{x_{\mathrm {min} }}^{\infty }x^{m}p(x)\mathrm {d} x={\frac {\alpha -1}{\alpha -1-m}}x_{\mathrm {min} }^{m}}$

which is only well defined for ${\displaystyle m<\alpha -1}$. That is, all moments ${\displaystyle m\geq \alpha -1}$ diverge: when ${\displaystyle \alpha <2}$, the average and all higher-order moments are infinite; when ${\displaystyle \alpha <3}$, the mean exists, but the variance and higher-order moments are infinite, etc. For finite-size samples drawn from such distribution, this behavior implies that the central moment estimators (like the mean and the variance) for diverging moments will never converge - as more data is accumulated, they continue to grow.

Another kind of power-law distribution, which does not satisfy the general form above, is the power law with an exponential cutoff

${\displaystyle p(x)\propto L(x)x^{-\alpha }\mathrm {e} ^{-\lambda x}}$

where we introduce an exponential decay term ${\displaystyle \mathrm {e} ^{-\lambda x}}$ that overwhelms the power-law behavior at large values of ${\displaystyle x}$. This distribution does not scale and is thus not asymptotically a power law; however, it does approximately scale over a finite region before the cutoff. (Note that the pure form above is a subset of this family, with ${\displaystyle \lambda =0}$.) This distribution is a common alternative to the asymptotic power-law distribution because it naturally captures finite-size effects. For instance, although the Gutenberg-Richter Law is commonly cited as an example of a power-law distribution, the distribution of earthquake magnitudes cannot scale as a power law in the limit ${\displaystyle x\rightarrow \infty }$ because there is a finite amount of energy in the Earth's crust. Thus, there must be some maximum size earthquake, and the scaling behavior must taper off beyond slightly smaller value.

### Plotting power-law distributions

In general, power-law distributions are plotted on doubly logarithmic axes, which emphasizes the upper tail region. The most convenient way to do this is via the (complementary) cumulative distribution (cdf), ${\displaystyle P(x)=\mathrm {Pr} (X>x)}$,

${\displaystyle P(x)=1-C\int _{x}^{\infty }p(X)\mathrm {d} X=1-{\frac {\alpha -1}{x_{\mathrm {min} }^{-\alpha +1}}}\int _{x}^{\infty }X^{-\alpha }\mathrm {d} X=1-\left({\frac {x}{x_{\mathrm {min} }}}\right)^{(-\alpha +1)}}$.

Note that the cdf is also a power-law distribution, but with a smaller scaling exponent. For data, an equivalent form of the cdf is the rank-frequency approach, in which we first sort the ${\displaystyle n}$ observed values in ascending order, and plot them against the vector ${\displaystyle [1,{\frac {n-1}{n}},{\frac {n-2}{n}},\dots ,{\frac {1}{n}}]}$.

Although it can be convenient to log-bin the data, or otherwise smooth the probability density (mass) function directly, these methods introduce an implicit bias in the representation of the data, and thus should be avoided. The cdf, on the other hand, introduces no bias in the data and preserves the linear signature on doubly logarithmic axes.

### Estimating the exponent from empirical data

There are many ways of estimating the value of the scaling exponent for a power-law tail, however not all of them yield unbiased and consistent answers. The most reliable techniques are often based on the method of maximum likelihood. Alternative methods are often based on making a linear regression on either the log-log probability, the log-log cumulative distribution function, or on log-binned data, but these approaches should be avoided as they can all lead to highly biased estimates of the scaling exponent (see the Goldstein et al. reference below).

For real-valued data, we fit a power-law distribution of the form

${\displaystyle p(x)={\frac {\alpha -1}{x_{\mathrm {min} }}}\left({\frac {x}{x_{\mathrm {min} }}}\right)^{-\alpha }}$

to the data ${\displaystyle x\geq x_{\mathrm {min} }}$. Given a choice for ${\displaystyle x_{\mathrm {min} }}$, a simple derivation by this method yields the estimator equation

${\displaystyle {\hat {\alpha }}=1+n\left[\sum _{i=1}^{n}\ln {\frac {x_{i}}{x_{\mathrm {min} }}}\right]^{-1}}$

where ${\displaystyle \{x_{i}\}}$ are the ${\displaystyle n}$ data points ${\displaystyle x_{i}\geq x_{\mathrm {min} }}$. (For a more detailed derivation, see Hall or Newman below.) This estimator exhibits a small finite sample-size bias of order ${\displaystyle O(n^{-1})}$, which is small when ${\displaystyle n>100}$. Further, the uncertainty in the estimation can be derived from the maximum likelihood argument, and has the form ${\displaystyle \sigma ={\frac {\alpha -1}{\sqrt {n}}}}$. This estimator is equivalent to the popular Hill estimator from quantitative finance and extreme value theory.

For a set of ${\displaystyle n}$ integer-valued data points ${\displaystyle \{x_{i}\}}$, again where each ${\displaystyle x_{i}\geq x_{\mathrm {min} }}$, the maximum likelihood exponent is the solution to the transcendental equation

${\displaystyle {\frac {\zeta '({\hat {\alpha }},x_{\mathrm {min} })}{\zeta ({\hat {\alpha }},x_{\mathrm {min} })}}=-{\frac {1}{n}}\sum _{i=1}^{n}\ln {\frac {x_{i}}{x_{\mathrm {min} }}}}$

where ${\displaystyle \zeta (\alpha ,x_{\mathrm {min} })}$ is the incomplete zeta function. The uncertainty in this estimate follows the same formula as for the continuous equation. However, the two equations for ${\displaystyle {\hat {\alpha }}}$ are not equivalent, and the continuous version should not be applied to discrete data, nor vice versa.

Further, both of these estimators require the choice of ${\displaystyle x_{\mathrm {min} }}$. For functions with a non-trivial ${\displaystyle L(x)}$ function, choosing ${\displaystyle x_{\mathrm {min} }}$ too small produces a significant bias in ${\displaystyle {\hat {\alpha }}}$, while choosing it too small increases the uncertainty in ${\displaystyle {\hat {\alpha }}}$, and reduces the statistical power of our model. In general, the optimum choice of ${\displaystyle x_{\mathrm {min} }}$ depends strongly on the particular form of the lower tail, represented by ${\displaystyle L(x)}$ above.

### Examples of power-law distributions

A great many power-law distributions have been conjectured in recent years. For instance, power laws are thought to characterize the behavior of the upper tails for the popularity of websites, number of species per genus, the popularity of given names, the size of financial returns, and many others. However, much debate remains as to which of these tails are actually power-law distributed and which are not. For instance, it is commonly accepted now that the famous Gutenberg-Richter Law decays more rapidly than a pure power-law tail because of a finite exponential cutoff in the upper tail.

## Validating power laws

Although power-law relations are attractive for many theoretical reasons, demonstrating that data do indeed follow a power-law relation requires more than simply fitting such a model to the data. In general, many alternative functional forms can appear to follow a power-law form for some extent. Thus, the preferred method for validation of power-law relations is by testing many orthogonal predictions of a particular generative mechanism against data, and not simply fitting a power-law relation to a particular kind of data. As such, the validation of power-law claims remains a very active field of research in many areas of modern science.