Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

5. Probability distributions and the central limit theorem

School of Engineering, Nazarbayev University

Track: core  ·  Prerequisites: Chapters 1, 3 and 4

Reading: Taylor, ch. 5, 10 and 11 · Bevington & Robinson, ch. 2 · Fornasini, ch. 5 and 6 · Rouaud, ch. I and III

Part I treated an uncertainty as a standard deviation and combined standard deviations in quadrature, without saying much about the distributions behind them. This part of the book supplies the missing probability and statistics. This chapter introduces the distributions that occur most often in measurement, and explains why one of them, the normal distribution, appears almost everywhere.

  1. A random variable is described by its distribution; its mean and variance are the two numbers error analysis uses most.

  2. The binomial, Poisson and normal distributions are related as limits of one another.

  3. The uniform, exponential and Cauchy distributions each describe a common situation, and the Cauchy distribution is a warning.

  4. The central limit theorem explains why sums and means of many independent contributions are normally distributed, and how fast.

  5. The sample statistics of Chapter 4 have their own distributions: χ2\chi^2, Student’s tt and FF.

5.1 Random variables and their distributions

A measured value that changes unpredictably from one repetition to the next is a random variable. For a discrete variable (a count) the distribution is a set of probabilities P(k)P(k) with ∑kP(k)=1\sum_k P(k) = 1; for a continuous variable it is a probability density p(x)p(x), with P(a<x<b)=∫abp(x) dxP(a < x < b) = \int_a^b p(x)\,\mathrm dx and ∫p(x) dx=1\int p(x)\,\mathrm dx = 1.

Two numbers summarise a distribution. The mean (expectation value)

μ=⟨x⟩=∫x p(x) dx\mu = \langle x\rangle = \int x\,p(x)\,\mathrm dx

locates it, and the variance

σ2=⟨(x−μ)2⟩=⟨x2⟩−μ2\sigma^2 = \langle (x - \mu)^2\rangle = \langle x^2\rangle - \mu^2

measures its width. Why the variance, rather than, say, the mean absolute deviation? Because variances of independent quantities add. For independent xx and yy,

var⁡(x+y)=⟨(δx+δy)2⟩=σx2+2⟨δx δy⟩+σy2=σx2+σy2,\operatorname{var}(x + y) = \langle (\delta x + \delta y)^2\rangle = \sigma_x^2 + 2\langle\delta x\,\delta y\rangle + \sigma_y^2 = \sigma_x^2 + \sigma_y^2 ,

since ⟨δx δy⟩=⟨δx⟩⟨δy⟩=0\langle\delta x\,\delta y\rangle = \langle\delta x\rangle\langle\delta y\rangle = 0. No other measure of width combines this simply, and this one property is the root of quadrature addition (Section 1.4) and of the whole of Chapter 3.

Higher moments describe the shape: the skewness γ1=⟨(x−μ)3⟩/σ3\gamma_1 = \langle (x-\mu)^3\rangle/\sigma^3 measures asymmetry, the excess kurtosis γ2=⟨(x−μ)4⟩/σ4−3\gamma_2 = \langle (x-\mu)^4\rangle/\sigma^4 - 3 measures how heavy the tails are compared with a normal distribution, for which both are zero.

5.2 Binomial, Poisson and normal

Binomial. An experiment is repeated nn times; each trial succeeds with probability pp, independently of the others. The number of successes kk has the binomial distribution

P(k)=(nk)pk(1−p)n−k,μ=np,σ2=np(1−p).P(k) = \binom{n}{k} p^k (1-p)^{n-k}, \qquad \mu = np, \qquad \sigma^2 = np(1-p) .

The variance follows from the additivity above: kk is a sum of nn independent trials, each 1 with probability pp and 0 otherwise, so each has variance p−p2p - p^2. A typical use is an efficiency: if a detector records kk of nn particles, the efficiency ε^=k/n\hat\varepsilon = k/n has standard uncertainty ε^(1−ε^)/n\sqrt{\hat\varepsilon(1-\hat\varepsilon)/n}, which is small both when the efficiency is close to 0 and when it is close to 1.

Poisson. If nn is very large and pp very small, with np=μnp = \mu fixed, the binomial distribution becomes

P(k)=μke−μk!,mean μ,variance μ.P(k) = \frac{\mu^k e^{-\mu}}{k!}, \qquad \text{mean } \mu, \qquad \text{variance } \mu .

This is the distribution of the number of independent rare events in a fixed interval: radioactive decays, photons, cosmic rays, molecules crossing a surface. That the variance equals the mean is the origin of the N\sqrt N rule of counting experiments (Chapter 6).

Normal. For large μ\mu the Poisson distribution, and for large nn the binomial, approach the normal (Gaussian) distribution

p(x)=1σ2πexp⁡ ⁣[−(x−μ)22σ2],p(x) = \frac{1}{\sigma\sqrt{2\pi}}\exp\!\left[-\frac{(x-\mu)^2}{2\sigma^2}\right] ,

for which the probability of lying within 1σ1\sigma, 2σ2\sigma and 3σ3\sigma of the mean is 68.27 %, 95.45 % and 99.73 %.

P(|x - mu| < 1 sigma) = 0.6827
P(|x - mu| < 2 sigma) = 0.9545
P(|x - mu| < 3 sigma) = 0.9973
binomial(n=  8, p=0.500) vs Poisson(4): largest difference in P(k) = 0.0781
binomial(n= 40, p=0.100) vs Poisson(4): largest difference in P(k) = 0.0105
binomial(n=400, p=0.010) vs Poisson(4): largest difference in P(k) = 0.0010
Poisson(  4) vs normal: largest difference relative to the peak = 0.131
Poisson( 25) vs normal: largest difference relative to the peak = 0.049
Poisson(100) vs normal: largest difference relative to the peak = 0.024

The Poisson distribution of mean 4 is visibly skewed (panel (a) of the figure below); at a mean of 25 the normal approximation is good to a few per cent of the peak height, which is why counts of more than about 20 are usually treated as normal.

5.3 Three more distributions

Uniform. p(x)=1/(2a)p(x) = 1/(2a) on [−a,a][-a, a], with σ=a/3\sigma = a/\sqrt3. It describes rounding by a digital display (Section 1.3), the phase of an unsynchronised oscillation, and any Type B statement “somewhere within ±a\pm a”. The sum of two independent uniform variables of equal width has a triangular distribution, σ=a/6\sigma = a/\sqrt 6 for half-width aa.

Exponential. p(t)=λe−λtp(t) = \lambda e^{-\lambda t} for t≥0t \ge 0, with mean and standard deviation both 1/λ1/\lambda. It is the distribution of the waiting time between Poisson events and of the lifetime of an unstable particle or excited state. Its skewness is 2: the mean lies well above the median ln⁡2/λ\ln 2/\lambda.

Cauchy (Lorentzian). p(x)=1πΓ/2(x−x0)2+(Γ/2)2p(x) = \dfrac{1}{\pi}\dfrac{\Gamma/2}{(x - x_0)^2 + (\Gamma/2)^2}, the shape of a resonance line, of the energy distribution of an unstable state, and of the ratio of two independent zero-mean normal variables. Its tails fall off so slowly (∝x−2\propto x^{-2}) that the integrals for the mean and the variance do not converge. The distribution has a centre x0x_0 and a width Γ\Gamma, but no mean and no standard deviation. The consequence is striking: the average of NN Cauchy-distributed readings has the same distribution as a single reading, and averaging does not help at all (panel (d)). Error analysis built on standard deviations silently assumes distributions for which they exist, and a ratio with an uncertain denominator (Section 12.3) is where the assumption usually breaks.

Cauchy: interquartile range of the mean of    1 readings = 2.019  (single reading: 2.000)
Cauchy: interquartile range of the mean of   10 readings = 2.001  (single reading: 2.000)
Cauchy: interquartile range of the mean of 1000 readings = 2.053  (single reading: 2.000)

5.4 The central limit theorem

Let x1,…,xNx_1, \dots, x_N be independent, with the same distribution of mean μ\mu and finite variance σ2\sigma^2. The central limit theorem states that the distribution of their mean xˉ\bar x approaches a normal distribution of mean μ\mu and standard deviation σ/N\sigma/\sqrt N as NN grows, whatever the original distribution. (Only the finite variance is required, which is exactly what the Cauchy distribution lacks.) The same holds for sums, and, with some conditions, for sums of variables with different distributions, provided no single term dominates.

This is why measurement errors are so often normal: an error is usually the sum of many small, independent disturbances (vibration, electrical noise, temperature fluctuations, reading), none of them dominant. It is also why the mean of a few readings is closer to normal than the readings themselves, which justifies the use of normal-theory intervals for means even when individual readings are not normal.

How fast does it happen? For a sum of NN independent terms, the skewness falls as γ1/N\gamma_1/\sqrt N and the excess kurtosis as γ2/N\gamma_2/N. A symmetric distribution such as the uniform one converges very fast (the sum of three uniforms is already hard to distinguish from a normal distribution); a skewed one such as the exponential converges slowly.

 N    skewness of the mean of N exponentials    expected 2/sqrt(N)
  1                 2.021                          2.000
  2                 1.398                          1.414
  5                 0.907                          0.894
 10                 0.638                          0.632
 30                 0.365                          0.365
100                 0.205                          0.200

 N    P(|mean - mu| < sigma/sqrt(N))
  1         0.864
  3         0.715
 10         0.691
 30         0.684

For a single exponential reading, ±1σ\pm 1\sigma covers 86 % instead of 68 %. For the mean of three readings the figure is already 72 %, and for ten readings 69 %: the width of the normal approximation becomes usable quickly, while the asymmetry of the distribution of the mean persists much longer (panel (c) of the figure below).

5.5 Distributions of sample statistics: χ2\chi^2, tt and FF

Chapter 4 used three results without proof. They follow from three distributions, all derived from the normal one.

  • Chi-square. If z1,…,zνz_1, \dots, z_\nu are independent standard normal variables, χ2=∑zi2\chi^2 = \sum z_i^2 has the χ2\chi^2 distribution with ν\nu degrees of freedom: mean ν\nu, variance 2ν2\nu. For normal readings, (N−1)s2/σ2(N-1)s^2/\sigma^2 has this distribution with ν=N−1\nu = N-1; the “lost” degree of freedom is the one used to compute xˉ\bar x. This is the source of the uncertainty of the standard deviation, us/s≈1/2(N−1)u_s/s \approx 1/\sqrt{2(N-1)} (Section 4.3), and of the spread 2/ν\sqrt{2/\nu} of a reduced chi-square (Section 11.4).

  • Student’s tt. t=(xˉ−μ)/(s/N)t = (\bar x - \mu)/(s/\sqrt N) has the tt distribution with N−1N-1 degrees of freedom, whose heavier tails account for the uncertainty of ss (Section 4.4).

  • FF. The ratio of two independent reduced chi-squares, F=(χ12/ν1)/(χ22/ν2)F = (\chi^2_1/\nu_1)/(\chi^2_2/\nu_2), compares two variances (Chapter 8).

A simulation confirms the first two for samples of five normal readings.

(N-1) s^2 / sigma^2:  mean 3.998 (chi-square: 4),  variance 8.034 (chi-square: 8)
P(|t| < 1): simulated 0.6269,  Student t(4) 0.6261,  normal 0.6827
mean of s = 1.879 for sigma = 2.0:  s underestimates sigma on average by 6.0%

The last line is worth noting: although s2s^2 is an unbiased estimate of σ2\sigma^2, its square root ss is not an unbiased estimate of σ\sigma; for five readings it is about 6 % low on average. Bias and other properties of estimators are the subject of Chapter 7.

<Figure size 1012x792 with 4 Axes>

(a) Poisson distributions (points) and normal distributions of the same mean and variance (lines). (b) Five distributions scaled to unit standard deviation (the Cauchy distribution, which has none, is scaled to the same quartiles as the normal one). (c) The central limit theorem at work on exponential readings: the distribution of the mean approaches the normal one as NN grows, the skewness disappearing last. (d) Running means: for normal readings the mean settles as 1/N1/\sqrt N; for Cauchy readings it never settles, and occasional huge readings throw it about at any NN.

Summary

  • Variances of independent quantities add; this single fact underlies quadrature and the propagation law.

  • Binomial →\to Poisson for rare events, Poisson →\to normal for large counts; the Poisson variance equals its mean.

  • The uniform distribution describes rounding and bounded Type B information, the exponential distribution waiting times and lifetimes.

  • The Cauchy distribution has no mean or variance; averaging does not reduce its spread. Ratios with uncertain denominators lead there.

  • By the central limit theorem, sums and means of many independent contributions with finite variance become normal, symmetric ones fast, skewed ones slowly.

  • The χ2\chi^2, tt and FF distributions describe sample variances and the statistics built from them.

Exercises

  1. A detector registers 912 of 1000 incident particles. Give the efficiency with its binomial uncertainty. Why is the Poisson formula 912\sqrt{912} wrong here?

  2. Show that the triangular distribution of half-width aa has standard deviation a/6a/\sqrt 6, and verify by summing two simulated uniform variables.

  3. Simulate the ratio x/yx/y of two independent normal variables with means 0 and 1 and unit standard deviations. Compare its histogram with a Cauchy distribution. What changes when yy has mean 5?

  4. Repeat the convergence study of Section 5.4 for the sum of NN values drawn from a distribution with skewness 6 (for example, a lognormal with σln⁡=1\sigma_{\ln} = 1). How large must NN be for the skewness of the mean to fall below 0.2?

  5. Using the χ2\chi^2 distribution, find the exact 68 % interval for σ\sigma given s=1.0s = 1.0 from N=5N = 5 readings. Compare with s±s/2(N−1)s \pm s/\sqrt{2(N-1)}.