BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

Probability: sums of random variables and the central limit theorem

For independent random variables, the mean of a sum is the sum of the means and the variance is the sum of the variances, so the relative width of a sum of n similar terms shrinks like 1/√n. The density of a sum is the convolution of the densities. The central limit theorem says that a sum of many independent, identically distributed variables with finite variance is close to Gaussian, which is why Gaussians are everywhere in physics.

You need this first

Full reading path (3 pages)
  1. Probability: one random variable (8.044)
  2. Probability: two or more random variables (8.044)
  3. Probability: functions of a random variable (8.044)
On this page · 4 sections
  1. Means and variances add
  2. The density of a sum: convolution
  3. The central limit theorem
  4. Summary

Many quantities in physics are sums: the energy of a gas is a sum over its molecules, the displacement after a random walk a sum of steps. This lecture finds how sums of random variables behave, from their means and variances to their full densities, and ends with the central limit theorem, the reason the Gaussian is so common (slides 1–19; notes pp. 47–66). (MIT's material for this lecture is Greytak's slides and his probability notes, Chapter 4; this page follows them in its own words, with its own worked example. The notes' figures are not reproduced. In the formulas for the density of a sum, this page writes ζ\zeta for the value of the sum and η\eta for the integration variable; the notes use other letters.)

Means and variances add#

Let Sn=∑i=1nxiS_n = \sum_{i=1}^n x_i for nn statistically independent variables, with means EiE_i and variances σi2\sigma_i^2; their densities need not be alike (notes p. 47). The mean of the sum is the sum of the means. For the variance, expanding ⟨(Sn−⟨Sn⟩)2⟩\langle(S_n - \langle S_n\rangle)^2\rangle gives terms ⟨(xi−Ei)(xj−Ej)⟩\langle(x_i - E_i)(x_j - E_j)\rangle, which vanish for i≠ji \ne j by independence (notes pp. 47–48):

Mean and variance of a sum
⟨Sn⟩=∑i=1nEi,Var(Sn)=∑i=1nσi2\langle S_n\rangle = \sum_{i=1}^nE_i, \qquad \text{Var}(S_n) = \sum_{i=1}^n\sigma_i^2
In words

the average of capital S sub n equals the sum from i equals 1 to n of capital E initial, Var ( capital S sub n ) equals the sum from i equals 1 to n of sigma sub i squared

These hold for any nn, for continuous and discrete variables alike, even when one term dominates (slides 1–2). For identical variables, ⟨Sn⟩=nE\langle S_n\rangle = nE and Var(Sn)=nσ2\text{Var}(S_n) = n\sigma^2: the mean grows like nn but the width only like n\sqrt n, so the density becomes sharply peaked about its mean as nn grows (notes p. 48; slide 3). This is why the thermodynamic properties of large systems are so well defined.

The density of a sum: convolution#

For the whole density of s=x+ys = x + y, the three-step method of the last lecture works: x+y<ζx + y < \zeta below the line y=ζ−xy = \zeta - x, so (notes pp. 48–49; slides 4–5)

Density of a sum
ps(ζ)=∫−∞∞dη  px,y(η,ζ−η)p_s(\zeta) = \int_{-\infty}^{\infty}d\eta\;p_{x,y}\left(\eta, \zeta - \eta\right)
In words

p sub s ( zeta ) equals the integral from minus infinity to infinity of d eta p sub x y the quantity eta, zeta minus eta

valid even when xx and yy are dependent; for the jointly Gaussian pair of Lecture 2 it gives a Gaussian of zero mean and variance 2σ2(1+ρ)2\sigma^2(1 + \rho) (slide 5). For independent variables it is a convolution (notes p. 49; slide 6):

Convolution
ps(ζ)=∫−∞∞px(η) py(ζ−η) dηp_s(\zeta) = \int_{-\infty}^{\infty}p_x(\eta)\,p_y(\zeta - \eta)\,d\eta
In words

p sub s ( zeta ) equals the integral from minus infinity to infinity of p sub x ( eta ) p sub y the quantity zeta minus eta, d eta

In general the convolution of two functions pp and qq (written p ⊗ q in the notes) is ∫−∞∞p(z) q(x−z) dz\int_{-\infty}^{\infty}p(z)\,q(x - z)\,dz. Convolution is commutative, distributive and associative. To picture it: flip qq about the origin, shift it by xx, multiply by pp, integrate, and repeat for each xx (notes pp. 49–51).

Examples (notes pp. 51–55; slides 7–13). Two independent uniform variables, on ∣x∣≤a|x| \le a and ∣y∣≤b|y| \le b with b<ab < a, sum to a trapezoid, flat for ∣S∣<a−b|S| < a - b and falling linearly to zero at a+ba + b; equal widths give a triangle. Unpolarized thermal light is two independent, equally bright polarizations, each with the intensity density of Lecture 3; their convolution is a pure exponential, p(IT)=12σe−IT/(2σ)p(I_T) = \frac{1}{2\sigma}e^{-I_T/(2\sigma)}, where σ\sigma is now the mean intensity of one polarization (the notes reuse the letter this way; on the previous page σ2\sigma^2 was the variance of the field). In the slides, two members of the family 1n! a(z/a)ne−z/a\frac{1}{n!\,a}(z/a)^ne^{-z/a} convolve into a member of the same family; and the total time an atom of a hydrogen maser spends on the wall of its storage flask, after nn independent exponential stays of mean τ\tau, has the density 1k! τ(t/τ)ke−t/τ\frac{1}{k!\,\tau}(t/\tau)^ke^{-t/\tau} with k=n−1k = n - 1.

Forms that survive (notes pp. 55–59; slides 14–15). Convolution usually changes the shape, but not always. The sum of independent Gaussians is Gaussian, with means and variances adding; the sum of independent Poisson variables is Poisson; and the sum of independent Lorentzians (Cauchy densities)

Lorentzian density
p(x)=1π Γ(x−m)2+Γ2p(x) = \frac{1}{\pi}\,\frac{\Gamma}{(x - m)^2 + \Gamma^2}
In words

p(x) equals 1 over pi, times capital gamma over the quantity the quantity x minus m, all squared plus capital gamma squared

is Lorentzian with the half-widths Γ\Gamma adding, not their squares: the Lorentzian's variance is infinite, so the rule for variances does not apply (notes pp. 56 and 60). The easy way to see all three is with Fourier transforms: the transform of a convolution is the product of the transforms, and these three transforms keep their form when multiplied (notes pp. 58–59).

The central limit theorem#

When all nn variables are independent, identically distributed, with finite variance, and nn is large (notes p. 60; slides 16–18):

Central limit theorem
p(Sn)≈12πnσx2exp⁡(−(Sn−nEx)22nσx2)p(S_n) \approx \frac{1}{\sqrt{2\pi n\sigma_x^2}}\exp\left(-\frac{\left(S_n - nE_x\right)^2}{2n\sigma_x^2}\right)
In words

p( capital S sub n ) is approximately 1 over the square root of 2 pi n sigma sub x squared, times exp (- the quantity capital S sub n minus n capital E sub x, all squared over the quantity 2 n sigma sub x squared, )

The finite variance excludes cases like the Lorentzian. "For large nn" is often satisfied quickly. And "well represented" is deliberately loose: a sum of discrete variables stays discrete, a comb of delta functions whose envelope approaches the Gaussian (notes pp. 60–61; slide 18). Useful non-rigorous extensions: the Gaussian is often a good approximation for modest nn; the theorem may work even when the variables are not identical, provided none dominates the sum; and even independence can sometimes be relaxed when nn is very large (notes p. 61; slide 19). Knowingly or not, the theorem is often behind the assumption that a physical quantity is Gaussian.

How fast? (notes pp. 62–66). For four uniform variables on (−a,a)(-a, a), the exact density, a piecewise cubic, is already close to the Gaussian of variance 4a2/34a^2/3. A one-sided exponential, discontinuous and lopsided, needs more terms: the sum of nn exponentials of mean aa has the density Ske−S/ak! ak+1\frac{S^ke^{-S/a}}{k!\,a^{k+1}} with k=n−1k = n - 1, which approaches the Gaussian only slowly. A Poisson density of large mean, itself a sum of Poissons, approaches a Gaussian envelope too.

The sum of nn independent exponentials of mean aa, computed from the exact formula above, against the central-limit Gaussian of mean nana and variance na2na^2. For small nn the exact density is lopsided; by n≈20n \approx 20 they are close, though a slight lopsidedness remains.
Worked example

Dice, light and a maser

(a) Ten fair dice are rolled and added. Find the mean and standard deviation of the total, and estimate with the central limit theorem the probability that the total is 45 or more. (b) For unpolarized thermal light with mean total intensity ⟨IT⟩\langle I_T\rangle, what fraction of the time is the intensity above twice its mean? (c) An atom makes 25 independent stays on a wall, each exponential with mean τ\tau. Find the mean and standard deviation of the total time.

(a) Dice

One die has mean 3.5 and variance 3512≈2.92\frac{35}{12} \approx 2.92. Ten dice: mean 35, variance about 29.2, standard deviation about 5.40. A total of 45 or more, with the half-step correction for a discrete sum, starts at 44.5, which is 9.5/5.40≈1.769.5/5.40 \approx 1.76 standard deviations above the mean; the Gaussian gives about 0.039.

(b) Bright moments

p(IT)=1⟨IT⟩e−IT/⟨IT⟩p(I_T) = \frac{1}{\langle I_T\rangle}e^{-I_T/\langle I_T\rangle}, so prob(IT>2⟨IT⟩)=e−2≈0.135\text{prob}(I_T > 2\langle I_T\rangle) = e^{-2} \approx 0.135: thermal light is bright in bursts.

(c) Time on the wall

Means and variances add: 25τ25\tau and 25τ225\tau^2, so the standard deviation is 5τ5\tau, a fifth of the mean, while for a single stay it equals the mean.

Summary#

  • For independent variables means add and variances add; a sum of nn similar terms has relative width ∝1/n\propto 1/\sqrt n.
  • The density of a sum is ∫px,y(η,ζ−η) dη\int p_{x,y}(\eta, \zeta - \eta)\,d\eta, the convolution of pxp_x and pyp_y when they are independent.
  • Gaussians, Poissons and Lorentzians keep their form under addition; Fourier transforms make this easy to see.
  • Central limit theorem: a sum of many independent, identical variables of finite variance is close to Gaussian, with mean nEnE and variance nσ2n\sigma^2.

Symbols on this page

Show the 48 symbols used here
ζ\zeta zeta.
A value of the sum. Say it: “zeta” (sounds like “zay-ta or zee-ta”).
π\pi pi.
The ratio of a circle's circumference to its diameter, π ≈ 3.14159. Say it: “pi”.
ρ\rho rho.
The correlation coefficient of two Gaussian variables. Say it: “rho”.
σ\sigma sigma.
A standard deviation (of one term); in the light example, the mean intensity of one polarization. Say it: “sigma”.
τ\tau tau.
The mean duration of one stay on the wall. Unit: s. Say it: “tau” (sounds like “rhymes with cow”).
Γ\Gamma capital gamma.
The half width at half height of a Lorentzian. Say it: “capital gamma”.
∞\infty infinity.
Infinity: larger than any number. Say it: “infinity”.
≈\approx approximately equal.
Is approximately equal to. Say it: “is approximately”.
∝\propto proportional to.
Is proportional to: doubling one doubles the other. Say it: “is proportional to”.
≤\le less than or equal.
Is less than or equal to. Say it: “is less than or equal to”.
≠\neq not equal.
Is not equal to. Say it: “is not equal to”.
⟨\langle angle brackets.
The average (mean value) of what is inside, ⟨…⟩. Say it: “the average of”.
∫\int integral.
Integral: the sum of infinitely many small pieces, such as the area under a curve. Say it: “the integral of”.
∑\sum sum.
Sum: add up the terms over the range written below and above. Say it: “the sum of”.
aa a.
The half-width of a uniform density, or the mean of an exponential. Say it: “a”.
zz z.
The integration variable of a convolution. Say it: “z”.
kk k.
The number n − 1. Say it: “k”.
exp⁡\exp exponential.
The exponential function. Say it: “exp”.
xx x.
A random variable; in a convolution, the argument of the result. Say it: “x”.
yy y.
A second random variable. Say it: “y”.
tt t.
The total time spent on the wall. Unit: s. Say it: “t”.
dd d.
The d of an integral. Say it: “d”.
ii i.
A label running over the terms of the sum. Say it: “i”.
jj j.
A second label running over the terms of the sum. Say it: “j”.
nn n.
The number of variables in the sum. Say it: “n”.
ee e.
Euler's number. Say it: “e”.
mm m.
The centre of a Lorentzian. Say it: “m”.
bb b.
The half-width of the second uniform density. Say it: “b”.
qq q.
A second function in a convolution. Say it: “q”.
ss s.
The sum x + y. Say it: “s”.
pp p.
A probability density. Say it: “p”.
SS S.
The value of a sum. Say it: “capital S”.
EE E.
The mean of one term. Say it: “capital E”.
η\eta eta.
An integration variable: a value of x. Say it: “eta”.
pxp_{x} p x.
The density of x. Say it: “p sub x”.
pyp_{y} p y.
The density of y. Say it: “p sub y”.
xix_{i} x i.
The ith variable in the sum. Say it: “x sub i”.
xjx_{j} x j.
The jth variable in the sum. Say it: “x sub j”.
EiE_{i} E i.
The mean of x_i. Say it: “capital E initial”.
ExE_{x} E sub x.
The mean of each of the identical variables. Say it: “capital E sub x”.
σi\sigma_{i} sigma i.
The standard deviation of x_i. Say it: “sigma sub i”.
ITI_{T} I T.
The total intensity of unpolarized light. Unit: W/m². Say it: “capital I sub T”.
px,yp_{x,y} p x y.
The joint density of x and y. Say it: “p sub x y”.
SnS_{n} S n.
The sum of n random variables. Say it: “capital S sub n”.
psp_{s} p s.
The probability density of the sum s = x + y. Say it: “p sub s”.
σx\sigma_{x} sigma x.
The standard deviation of each of the identical variables. Say it: “sigma sub x”.
EjE_{j} E j.
The mean of x_j. Say it: “capital E sub j”.
pSp_{S} p S.
The probability density of the sum S. Say it: “p sub capital S”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 39 words used here

New here

central limit theorem.
The result that the sum of many independent random quantities, each with a finite spread, has a nearly Gaussian (bell-shaped) distribution.
Gaussian.
The bell-shaped curve e to the minus x squared, or a quantity spread out with that shape; also called a normal distribution.
Lorentzian.
A peaked curve of the form 1/(x² + a²), with much longer tails than a bell curve; also called a Cauchy density.

Also used

energy.
A quantity, measured in joules, that a body or field has because of its motion, position or state; a closed system keeps its total. Explained in Conservation of energy.
displacement.
The change in position from start to finish: how far and in which direction, ignoring the route in between. Explained in Vectors.
random walk.
A path made of steps in random directions; after N steps of length λ the typical distance from the start is only about λ√N. Explained in Mean free path, effusion, sound and diffusion.
random variable.
A quantity whose value cannot be predicted from what is known, although its behaviour follows the rules of probability. Explained in Probability: one random variable.
variance.
A measure of spread: the average of the squared distance of each value from the mean. Explained in Observables, the measurement postulate and uncertainty.
density.
How much of something (mass, charge, energy, particles or probability) there is in each unit of volume, area, length or other variable. Explained in Density and pressure.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
dummy variable.
The variable inside an integral or sum, which could be renamed without changing the result, like the t in ∫ f(t) dt. Explained in The second fundamental theorem of calculus.
statistically independent.
Of two random quantities: such that knowing one tells nothing about the other. Explained in Probability: two or more random variables.
independence.
Of random quantities or events: knowing one tells you nothing about the other, so their joint probability is the product of their separate probabilities.
continuous.
Without breaks, gaps or jumps: a continuous graph can be drawn without lifting the pen; a continuous quantity can take every value in a range. Explained in The rocket equation.
convolution.
A way of combining two functions by sliding one across the other and adding up their overlapping products at each shift. Explained in The convolution formula.
commutative.
Of an operation: giving the same result in either order, as in a + b = b + a. Explained in Vectors.
distributive.
Of a product: spreading over a sum, so that a times (b + c) equals a times b plus a times c. Explained in Vector analysis: why the dot product has a cosine.
associative.
Of an operation: giving the same result however the steps are grouped, as in (a + b) + c = a + (b + c). Explained in Vectors.
integration.
Finding an integral: adding up very many small pieces, or finding an antiderivative. Explained in Differentials and antiderivatives.
uniform.
The same at every point, or unchanging in time: a uniform rod has the same density all along it. Explained in The electric field.
linear.
Of a relation or equation: using only first powers of the unknowns, so doubling the cause doubles the effect and effects simply add. Explained in Solving and rearranging formulas.
intensity.
How much energy a wave, or a beam of particles, carries each second through each square metre of a surface facing it. Explained in Sound and intensity.
polarization.
The direction in which the electric field of a light wave (or other transverse wave) swings back and forth. Explained in Polarization.
field.
Something that has a value at every point of space, such as the temperature, the wind velocity or the electric field at each place. Explained in Newton's law of gravitation.
maser.
A device that makes an intense, single-frequency beam of microwaves by stimulated emission; the microwave forerunner of the laser. Explained in The ammonia molecule, the maser and the rotating frame.
Fourier transform.
A way of writing a signal as a sum of pure waves, giving how much of each frequency it contains. Explained in The Fourier transform and AM radio.
delta function.
An idealised spike: zero everywhere except at one point, yet with total area one. It describes a sudden kick or a point source. Explained in The Fourier transform and AM radio.
envelope.
The smooth curve that just touches the peaks of a fast oscillation or a row of peaks, showing how their size slowly changes. Explained in Coupled pendulums and beats.
theorem.
A statement that has been proved true, step by step, from definitions and earlier results. Explained in Limits and continuity.
discontinuity.
A point where a function is not continuous: its graph jumps, has a hole or shoots off to infinity there. Explained in Curve sketching with the first and second derivative.
standard deviation.
A measure of how widely values are spread around their average, in the same units as the values: the square root of the variance. Explained in Probability: one random variable.

Academic

vanish.
To become zero; sometimes, of a fixed point or solution, to stop existing.
dominate.
To be the largest contribution, so that the others hardly matter.
valid.
True or correctly applicable under the stated conditions.
identically.
In exactly the same way; in maths, for every value of the variable, as when a function is zero everywhere.
satisfy.
To make an equation or condition true.
rigorous.
Careful and exact in every step, so that nothing is assumed without proof.
approximation.
Close to, but not exactly, the true value; an approximation is such a value or formula, chosen because it is simpler.
assumption.
Something accepted as true, without proof, so that an argument or calculation can proceed; to assume is to accept it so.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

Pages that build on this

Practise

Check your understanding

  1. For nn independent variables with the same mean EE and variance σ2\sigma^2, how does the relative width of their sum behave?
  2. Two independent variables, each uniform on (−a,a)(-a, a), are added. What shape is the density of the sum?
  3. Which of these densities keeps its form when independent copies are added?
  4. Why does the central limit theorem not apply to sums of Lorentzian variables?
0 of 4 answered

Flashcards

1 / 3