Content area
Full text
About the Authors:
Jeff Alstott
* E-mail: [email protected]
Affiliations Section on Critical Brain Dynamics, National Institute of Mental Health, Bethesda, Maryland, United States of America, Brain Mapping Unit, Behavioural and Clinical Neuroscience Institute, University of Cambridge, Cambridge, United Kingdom
Ed Bullmore
Affiliation: Brain Mapping Unit, Behavioural and Clinical Neuroscience Institute, University of Cambridge, Cambridge, United Kingdom
Dietmar Plenz
Affiliation: Section on Critical Brain Dynamics, National Institute of Mental Health, Bethesda, Maryland, United States of America
Introduction
Power laws are probability distributions with the form:(1)
Power law probability distributions are theoretically interesting due to being “heavy-tailed”, meaning the right tails of the distributions still contain a great deal of probability. This heavy-tailedness can be so extreme that the standard deviation of the distribution can be undefined (for ), or even the mean (for ). These qualities make for a scale-free system, in which all values are expected to occur, without a characteristic size or scale. Power laws have been identified throughout nature, including in astrophysics, linguistics, and neuroscience [1]–[4]. However, accurately fitting a power law distribution to empirical data, as well as measuring the goodness of that fit, is non-trivial. Furthermore, empirical data from a given domain likely comes with domain-specific considerations that should be incorporated into the statistical analysis.
In recent years several statistical methods for evaluating power law fits have been developed [5], [6]. We here introduce and describe powerlaw, a Python package for easy implementation of these methods. The powerlaw package is an advance over previously available software because of its ease of use, its exhaustive support for a variety of probability distributions and subtypes, and its extensibility and maintainability. The incorporation of numerous distribution types and fitting options is of central importance, as appropriate fitting of a distribution to data requires consideration of multiple aspects of the data, without which fits will be inaccurate. The easy extensibility of the code base also allows for future expansion of powerlaw's capabilities, particularly in the form of users adding new theoretical probability distributions for analysis.
In this report we describe the structure and use of powerlaw. Using powerlaw, we will give examples of fitting power laws and other distributions to data, and give guidance on what factors and fitting options to consider about the data...