(Some of) the most famous distributions

Easy-peasy: the uniform

Let's go look at some of the most famous/common distributions you can see around. Not exhaustive and maybe you could even say that what's most popular is a matter of who you are.
Now that we're at it, let's also calculate expected value and variance (at least) for these ones.
Given a continuous variable
taking values in interval
[a,b][a, b]
, a uniform distribution is one where every possible value has the same probability. Its pdf is simply
p(x)=1ba,p(x) = \frac{1}{b-a} ,
because you have 1 case over the total possible cases, which is the width of the interval.
The expected value is
E[X]=abdx 1ba=b+a2 ,\mathbb{E}[X] = \int_a^b \text{d}x \ \frac{1}{b-a} = \frac{b+a}{2} \ ,
which, as expected (!), corresponds to the middle point of the interval because given that every point is equiprobable, this is where we fall by averaging values.
The variance is
Var[X]=abdx x(x1ba)2=abdx x32x21ba+x(ba)2=b4a4423b3a3ba+b2a22(ba)2=(b2a2)(b2+a2)423(ba)(b2+ab+a2)ba+b+a2(ba)= (ba)212 .\begin{align} Var[X] &= \int_a^b \text{d} x \ x \Big(x - \frac{1}{b-a}\Big)^2 \\ &= \int_a^b \text{d} x \ x^3 - 2x^2\frac{1}{b-a} + \frac{x}{(b-a)^2} \\ &= \frac{b^4 - a^4}{4} - \frac{2}{3} \frac{b^3 - a^3}{b-a} + \frac{b^2-a^2}{2(b-a)^2} \\ &= \frac{(b^2 - a^2)(b^2 + a^2)}{4} - \frac{2}{3} \frac{(b-a)(b^2 + ab + a^2)}{b-a} + \frac{b+a}{2(b-a)} \\ & = \ \frac{(b-a)^2}{12} \ . \end{align}

Success or failure: the Bernoulli

Let's consider a binary variable
X{0,1}X \in \{0, 1\}
, so that it can take the two values 1 (which we'll call the success) or 0 (which we'll call the failure). The prototype of this is the result of flipping of a coin. Let's also call
the probability of the success so that, by definition
P(X=1)=μ ;P(X=0)=1μ ,P(X=1) = \mu \ ; P(X=0) = 1 - \mu \ ,
so that the pmf (it is a discrete variable) can be expressed as
p(x;μ)=μx(1μ)1xp(x;\mu) = \mu^x(1-\mu)^{1-x}
because when we have
we are left with
and when we have
we are left with
Said distribution has expected value
E[X]=x{0,1}xμx(1μ)1x=0+1μ(1μ)0=μ\mathbb{E}[X] = \sum_{x \in \{0,1\}} x \mu^x(1-\mu)^{1-x} = 0 + 1\mu(1-\mu)^0 = \mu
and variance
Var[X]=x{0,1}x2μx(1μ)1xμ2=μμ2=μ(1μ)Var[X] = \sum_{x \in \{0,1\}} x^2 \mu^x(1-\mu)^{1-x} - \mu^2 = \mu - \mu^2 = \mu(1-\mu)
The Bernoulli distribution is a special case of a binomial distribution for a single observation, see below!

More successes and more failures: the Binomial

The binomial distribution describes the probability of observing
occurrences of
in a set of
samples from a Bernoulli distribution.
is the probability of observing
. The pmf will be then
p(x;μ)=(nk)μk(1μ)nk ,p(x;\mu) = {{n}\choose{k}} \mu^k (1-\mu)^{n-k} \ ,
because we have
ways of creating groups of
values and because each extraction is a Bernoulli.
The expected value is
E[X]=nμ\mathbb{E}[X] = n \mu
and the variance is
Var[X]=nμ(1μ)Var[X] = n \mu (1- \mu)
Head to Wikipedia for the proofs.

Extending all that^: the Multinomial

It is a multivariate generalisation of the binomial and gives the distribution over counts
for a
-state discrete variable to be in state
given a total of observations
An example is the extraction of
balls of
different colours from a bag, replacing the extracted ball after each draw. The pmf reads
p(m1,m2,,mk,μ1,μ2,,μk,n)=(nm1m2mk)μ1m1μ2m2μkmkp(m_1, m_2, \ldots, m_k, \mu_1, \mu_2, \ldots, \mu_k, n) = {{n}\choose{m_1 m_2 \ldots m_k}} \mu_1^{m_1} \mu_2^{m_2} \ldots \mu_k^{m_k}
and we have
E[mk]=nμk ,Var[mk]=nμk(1μk)\mathbb{E}[m_k] = n \mu_k \ , Var[m_k] = n \mu_k(1-\mu_k)

Her majesty the Gaussian

The gaussian distribution (after C F Gauss) is also called a normal distribution or, in some cases, bell curve (from its shape). Let
be the expected value and
the standard deviation,
p(x;μ,σ)=12πσ2e12σ2(xμ)2p(x; \mu, \sigma) = \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-\frac{1}{2 \sigma^2} (x-\mu)^2}
It is usually indicated as
N(μ,σ2)\mathcal N(\mu, \sigma^2)
, where the
N\mathcal N
stands for "normal".

The Beta

Given a continuous variable
x[0,1]x \in [0, 1]
, the distribution is parametrised by
α,β>0\alpha, \beta > 0
which define its shape.
p(x;α,β)=Nxα1(1x)β1 ,p(x; \alpha, \beta) = N x^{\alpha-1}(1-x)^{\beta-1} \ ,
$\mathcal{N}$ is the normalisation constant:
N=Γ(α+β)Γ(α)Γ(β)=1duuα1(1u)β1 ,N = \frac{\Gamma(\alpha + \beta)}{\Gamma(\alpha) \Gamma(\beta)} = \frac{1}{\int d u u^{\alpha -1}(1-u)^{\beta-1}} \ ,
the gamma function (extension of the factorial to real and complex numbers), defined as
Γ(t)=0xt1exdx\Gamma(t) = \int_0^\infty x^{t-1} e^{-x} dx
Γ(α+β)Γ(α)Γ(β)=1B(α,β) ,\frac{\Gamma(\alpha + \beta)}{\Gamma(\alpha) \Gamma(\beta)} = \frac{1}{B(\alpha, \beta)} \ ,
being the beta function.
The beta distribution is the conjugate prior of the Bernoulli distribution for which
are the prior number of observations
. When
, it reduces to a uniform distribution.

The Student's t

Student was the pseudonym of W Gosset, which we can all consider ourselves very grateful to, given all his seminal work in Statistics. He was working at the Guinness brewery in Dublin and produced various intellectual findings while working with beer data, but had to publish under a false name due to company's regulations, and he chose "Student".
This distribution arises when estimating the mean of a normally distributed population in situations where the sample size is small and the population standard deviation is unknown. Hence, it describes a sample extracted from said population: the larger the sample, the more the distribution resembles the normal.
p(x;ν)=Γ(ν+12)νπΓ(ν2)(1+x2ν)ν+12p(x; \nu) = \frac{\Gamma(\frac{\nu+1}{2})}{\sqrt{\nu \pi} \Gamma(\frac{\nu}{2})} \Big(1 + \frac{x^2}{\nu}\Big)^{-\frac{\nu+1}{2}}
is the number of degrees of freedom. For
, the distribution reduces to the Cauchy distribution.

The elegant Chi-squared,

It is the distribution (with
degrees of freedom) of the sum of the squares of
independent standardised normal variables
(that is, normal variables standardised to have mean 0 and standard deviation 1). It is a special case of the
Q=1kzi2 ,Q = \sum_1^k z_i^2 \ ,
Qχ2(k)Q \sim \chi^2(k)
and depends on the degrees of freedom.

The Poisson: events in time or space

It is a discrete probability distribution and describes the probability that a given number of events occurs in a fixed interval of time and/or space if they are known to occur with a certain (known) average rate and independently of the time and/or distance of the last event.
An example is the mail you receive per day. Suppose on average you receive 4 mails per day. Assuming that the events "mail arriving" are independent, then it is reasonable to assume that the number of mails received each day follows a Poissonian. Other examples are the number of people in a queue at a given time of the day or the number of goals scored in a world cup match, see below.
P(k)=λkeλk! ,P(k) = \frac{\lambda^k e^{-\lambda}}{k!} \ ,
k=0,1,2,k = 0, 1, 2, \ldots
is the number of events in an interval and
the average number of such events in the same interval.
The expected value is
E[k]=k0kλkeλk!=k1λλk1(k1)!eλ=λeλeλ=λ\mathbb{E}[k] = \sum_{k \geq 0} k \frac{\lambda^k e^{-\lambda}}{k!} = \sum_{k \geq 1} \lambda \frac{\lambda^{k-1}}{(k-1)!} e^{-\lambda} = \lambda e^{-\lambda} e^\lambda = \lambda
and the variance is
Var[k]=E[k2]E2[k]=k0k2λkeλk!λ2=λeλk1kλk1(k1)!λ2=λeλ[k1(k1)λk1(k1)!+k1λk1(k1)!λ2]=λ[λk21(k2)!λk2+k11(k1)!λk1λ2]=λeλ[λk21(k2)!λk2+k11(k1)!λk1λ2]=λeλ[λi01i!λi+j01j!λj]=λeλ[λeλ+eλ]λ2=λ2+λλ2=λ \begin{align*} Var[k] &= \mathbb{E}[k^2] - \mathbb{E}^2[k] \\ &= \sum^{k \geq 0} k^2 \frac{\lambda^k e^{-\lambda}}{k!} - \lambda^2 \\ &= \lambda e^{-\lambda} \sum_{k \geq 1} k \frac{\lambda^{k-1}}{(k-1)!} - \lambda^2 \\ &= \lambda e^{-\lambda} \Big[ \sum_{k \geq 1} (k-1) \frac{\lambda^{k-1}}{(k-1)!} + \sum_{k \geq 1} \frac{\lambda^{k-1}}{(k-1)!} - \lambda^2 \Big] \\ &= \lambda \Big[ \lambda \sum_{k \geq 2} \frac{1}{(k-2)!} \lambda^{k-2} + \sum_{k \geq 1} \frac{1}{(k-1)!} \lambda^{k-1} - \lambda^2 \Big] \\ &= \lambda e^{-\lambda} \Big[ \lambda \sum_{k \geq 2} \frac{1}{(k-2)!} \lambda^{k-2} + \sum_{k \geq 1} \frac{1}{(k-1)!} \lambda^{k-1} - \lambda^2\Big] \\ &= \lambda e^{-\lambda} \Big[ \lambda \sum_{i \geq 0} \frac{1}{i!}\lambda^i + \sum_{j \geq 0} \frac{1}{j!} \lambda^j \Big] \\ &= \lambda e^{- \lambda} [\lambda e^\lambda + e^\lambda] - \lambda^2 = \lambda^2 + \lambda - \lambda^2 = \lambda \end{align*}
So expected value and variance are the same and equal to the average rate of occurrence.
The Poisson distribution is appropriate if
  • the events are independent, i.e., the occurrence of one of them does not affect the probability that a second one occurs;
  • the rate with which events occur is constant;
  • two events cannot occur at the same time;
  • the probability of an occurrence of an event in an interval is proportional to the length of the interval


Knowing from historical data that the average number of goals scored in a world football match is 2.5, and because the phenomenon can be described by a Poissonian, we have
P(k goals in a match)=2.5ke2.5k! P(k \text{ goals in a match}) = \frac{2.5^k e^{-2.5}}{k!} \
and we can calculate the expected value and the variance as above.
An example of a phenomenon which violates the Poissonian assumptions would be the number of students arriving at the student union: the rate is not constant (as it is low during class time and high between class times) and events are co-occurring (students tend to come in groups).

The Dirichlet

It is a continuous multivariate distribution and the generalisation of the beta distribution, typically denoted as
being the parametrising vector such that
α=(αi),αiR,αi>0i\alpha = (\alpha_i), \alpha_i \in \mathbb{R}, \alpha_i > 0 \forall i
. It is usually used as a prior in bayesian statistics as it is the conjugate prior of the multinomial distribution.
A Dirichlet distribution of order
k2k \geq 2
with parameters
has the probability density function
f(x1,,xk;α1,,αk)=1B(α)Πi=1kxiαi1f(x_1, \ldots, x_k; \alpha_1, \ldots, \alpha_k) = \frac{1}{B(\alpha)} \Pi_{i=1}^k x_i^{\alpha_i - 1}
being the beta function in
living on the open
-dimensional simplex
x1,,xk>0x_1, \ldots, x_k > 0
x1++xk1<1x_1 + \ldots + x_{k-1} < 1
xk=1x1xk1x_k = 1 - x_1 - \ldots - x_{k-1}

The power of the power-law

The power-law is a great one, a deserves a bit of commentary.

What's a power law, in general

A power law is, in general, a mathematical function of type
f(x)xα ,f(x) \propto x^\alpha \ ,
so that in a log-log plot it will appear as a straight line because
f(x)=Axαlog(f(x))=logA+αlogx .f(x) = Ax^\alpha \Rightarrow \log(f(x)) = \log A + \alpha \log x \ .
Let's look at it.
# Plotting a power function
x = np.array([i for i in np.arange(0.1, 1.1, 0.01)])
y = np.array([item**-0.3 for item in x])
plt.plot(x, y, label='$y = x^{-0.3}$')
plt.xticks([i for i in np.arange(0, 1.1, 0.1)])
plt.title("A power law")

Power law distributions

Newman's paper in [1] is a great source about the topic and lots of what will be presented here is re-elaborated from there. It is also a very clearly written and enjoyable paper. The Wikipedia page [3] on the topic is also quite well written.
We talk of data distributed as a power law when the quantity we are measuring has a probability which is a power of the quantity itself, so that a power-law distribution has a probability density function typically written as
p(x)=Axα ,p(x) = A x^{-\alpha} \ ,
is the normalisation constant.
We put a minus sign in front of the exponent (with respect to what we wrote above for a generic power-law function) as we're thinking of a decreasing relation.
There must be a minimum value
, otherwise it wouldn't be normalisable (the area under the curve would diverge, see figure above).
As for the exponent, we need to have
for it to be a pdf, hence integrable, because by definition,
1=xminp(x)dx=Axminxαdx=Aα+1[xα+1]xmin\begin{align} 1 &= \int_{x_{min}}^\infty p(x) \text{d} x \\ &= A \int_{x_{min}}^\infty x^{-\alpha} \text{d} x \\ &= \frac{A}{-\alpha + 1} \Big[x^{-\alpha + 1}\Big]_{x_{min}}^\infty \\ \end{align}
which is only non-diverging when
. From here, the normalisation constant is
A=(α1) xminα1A=(\alpha-1)\ x_{min}^{\alpha-1}

Where you find them

Many observed phenomena in several disciplines follow power-law distributions, examples are the Zipf in linguistics, the Pareto in economics, the Taylor in ecology, ... In a typical situation though, it is the tail of a distribution which is power-law.
In [5] Mandelbrot and Taleb exquisitely talk about when using a gaussian paradigm for a power law phenomenon can lead to disaster in finance.

What makes them interesting

  • the absence of a typical scale: while other distributions (the gaussian being the king example) will have a typical value which can be used as representative of the distribution (along with an error), power laws are scale-free: values can span several orders of magnitude
  • scale invariance: if the independent variable is rescaled by a factor, the law only gets affected by proportional scaling, so a consequence, this means that all power laws with the same exponents are rescaled versions of each other:
p(cx)=A(cx)α=Acαxα ,p(cx) = A (cx)^{-\alpha} = A c^{-\alpha} x^{-\alpha} \ ,
  • long tail: in a power law, the tail is fat, meaning that the frequency of the highly frequent items is higher than it would be in other distributions This is brilliantly explained in this blog post by Panos Ipeirotis [4], where he points out that despite the fact that a power law is often described as a distribution where "there are a lot of very unfrequent items and a few very frequent ones", this is a distortion of reality: what is striking of a power law is that actually the very frequent items occur much more frequently than they would in other distributions.


The mean of a power law is only defined when
E[x]=xˉ=Axminxxαdx=Axminxα+1dx=Aα+2[xα+2]xmin \begin{align} \mathrm{E}[x] = \bar x &= A \int_{x_{min}}^\infty x x^{-\alpha} \text{d} x \\ &= A \int_{x_{min}}^\infty x^{-\alpha + 1} \text{d} x \\ &= \frac{A}{-\alpha + 2} \Big[x^{-\alpha + 2}\Big]_{x_{min}}^\infty \end{align}
The variance of a power law is only defined when
Var[x]=Axmin(xxˉ)2xαdx=Axminxα+2+(xˉ)2xα2xα1xˉdx\begin{align} \mathrm{Var}[x] &= A \int_{x_{min}}^\infty (x-\bar x)^2 x^{-\alpha} \text{d} x \\ &= A \int_{x_{min}}^\infty x^{-\alpha + 2} + (\bar x)^2 x^{-\alpha} - 2 x^{-\alpha-1} \bar x \text{d} x \end{align}

Plotting it

A simple plot in log-log scale of the histogram of data helps the eye spot potential power-law behaviours, but this alone is a very unreliable way of identifying the distribution. Because there is much less data in the tail than there is in the head of the distribution, the tail will appear very noisy.
A better way is to plot the data histogrammed, but with logarithmic binning, and in log-log scale. This helps reduce the noisy tail problem.


To be honest these are all about power-laws.
  1. 1.
    M E Newman, Power laws, Pareto distributions and Zipf’s law, Contemporary physics 46.5, 2005
  2. 2.
    J Alstott, E Bullmore, D Plenz, powerlaw: a Python package for analysis of heavy-tailed distributions, PloS ONE 9.1, 2014
  3. 5.
    B Mandelbrot, N N Taleb, How the Finance Gurus Get Risk All Wrong, Fortune magazine, Jul 2005