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

Random variables: independence, the binomial distribution and the central limit theorem

A random variable is fixed by its probability distribution; its average, moments and fluctuation follow. Two random variables have a joint probability, from which come the probability of each one alone and the conditional probability of one given the other. They are independent when the joint probability is the product of the two, and then the average of the product is the product of the averages; the difference measures their correlation. For n independent two-valued variables the number of ones has the binomial distribution, with mean np and variance np(1 − p), and by the central limit theorem the mean of many independent variables is Gaussian with a variance that falls like 1/n.

You need this first

Full reading path (4 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)
  4. Probability: sums of random variables and the central limit theorem (8.044)
On this page · 10 sections
  1. One random variable
  2. Two random variables and their joint probability
  3. Conditional probability
  4. Two dice examples
  5. Independence and correlation
  6. The binomial distribution
  7. Wen's trick for the averages
  8. The central limit theorem
  9. Why large systems hardly fluctuate
  10. Summary

Statistical physics never predicts what one molecule does; it predicts probabilities, and averages over them. Chapter V of Wen's notes (pp. 36–40) collects the probability that the rest of the course needs: one random variable, two random variables and what it means for them to be independent, the binomial distribution, and the central limit theorem. 8.044 built the same tools for continuous variables with probability densities, in one random variable, two random variables and sums and the central limit theorem; this page follows Wen's shorter route, which works with discrete variables and sums instead of integrals, and links to those pages for the parts they treat at length. (MIT's material for this chapter is five scanned handwritten pages, numbered 36 to 40 at the top right; citations use those numbers and Wen's circled point numbers. Everything here is in our own words, with our own examples.)

One random variable#

A random variable ss is a quantity whose value is not fixed but comes with a probability: P(s)P(s) is the probability that it takes the value ss (notes p. 36, point ①). The probabilities of all possible values add up to one:

Normalization
∑sP(s)=1\sum_s P(s) = 1
In words

the sum over s of capital P (s) equals 1

The distribution P(s)P(s) says everything there is to know about ss. Two kinds of number summarize it. The average and, more generally, the moments are

Average and moments
⟨s⟩=∑ss P(s),⟨sn⟩=∑ssnP(s)\langle s\rangle = \sum_s s\,P(s), \qquad \langle s^n\rangle = \sum_s s^n P(s)
In words

the average of s equals the sum over s of s capital P (s), the average of s to the power n equals the sum over s of s to the power n capital P (s)

and the fluctuation Δs\Delta s, the typical distance of ss from its average, is the square root of the average squared distance:

Fluctuation
Δs=⟨(s−⟨s⟩)2⟩=⟨s2⟩−⟨s⟩2\Delta s = \sqrt{\langle(s - \langle s\rangle)^2\rangle} = \sqrt{\langle s^2\rangle - \langle s\rangle^2}
In words

capital delta s equals the square root of the average of the quantity s minus the average of s, all squared equals the square root of the average of s squared minus the average of s squared, end of root

The second form follows by expanding the square: ⟨(s−⟨s⟩)2⟩=⟨s2⟩−2⟨s⟩⟨s⟩+⟨s⟩2\langle(s - \langle s\rangle)^2\rangle = \langle s^2\rangle - 2\langle s\rangle\langle s\rangle + \langle s\rangle^2, since ⟨s⟩\langle s\rangle is a fixed number that comes out of the average. The square (Δs)2(\Delta s)^2 is the variance. For example, if ss is 1 with probability pp and 0 otherwise, then ⟨s⟩=p\langle s\rangle = p and, since s2=ss^2 = s, also ⟨s2⟩=p\langle s^2\rangle = p; so (Δs)2=p−p2=p(1−p)(\Delta s)^2 = p - p^2 = p(1 - p). This two-valued variable is the building block of the rest of the chapter. (For continuous variables the sums become integrals over a probability density, as on the 8.044 page.)

Two random variables and their joint probability#

Now take two random variables s1s_1 and s2s_2, each of which can be 0 or 1 (notes p. 36, point ②). Each has its own distribution: P1(1)P_1(1) is the probability that s1=1s_1 = 1, and P1(0)=1−P1(1)P_1(0) = 1 - P_1(1); likewise P2(1)P_2(1) and P2(0)=1−P2(1)P_2(0) = 1 - P_2(1) for s2s_2.

What is the probability that s1=1s_1 = 1 and s2=1s_2 = 1? It is tempting to answer P1(1)P2(1)P_1(1)P_2(1), and Wen writes exactly that with a question mark, then marks it wrong with a cross: in general it is wrong. Knowing the two separate distributions is not enough, because they say nothing about whether the two variables tend to go together. The complete description is the joint probability P12(s1,s2)P_{12}(s_1, s_2), one number for each pair of values, boxed in the notes. Its four values add up to one:

Joint probability
P12(1,1)+P12(1,0)+P12(0,1)+P12(0,0)=1P_{12}(1,1) + P_{12}(1,0) + P_{12}(0,1) + P_{12}(0,0) = 1
In words

capital P sub 1 2 (1,1) plus capital P sub 1 2 (1,0) plus capital P sub 1 2 (0,1) plus capital P sub 1 2 (0,0) equals 1

The joint probability contains the separate distributions. The probability that s1=1s_1 = 1, whatever s2s_2 is, is the sum over both values of s2s_2:

Probability of one variable alone
P1(1)=P12(1,1)+P12(1,0)P_1(1) = P_{12}(1,1) + P_{12}(1,0)
In words

capital P one (1) equals capital P sub 1 2 (1,1) plus capital P sub 1 2 (1,0)

In general P1(s1)=∑s2P12(s1,s2)P_1(s_1) = \sum_{s_2}P_{12}(s_1, s_2): summing out one variable leaves the distribution of the other (in 8.044 this is the "marginal" density, obtained by integrating instead of summing). The reverse is not possible: P1P_1 and P2P_2 together have two free numbers, P12P_{12} has three.

Conditional probability#

Suppose we are told that s2=1s_2 = 1. What is now the probability of each value of s1s_1 (notes p. 37)? Only the outcomes with s2=1s_2 = 1 are left, so the new probability is proportional to P12(s1,1)P_{12}(s_1, 1). Dividing by the sum over s1s_1 makes it add up to one again. This is the conditional probability, which Wen writes "P if s₂ = 1" of s1s_1 and we write in the usual way with a bar, read "given":

Conditional probability
P(s1∣s2=1)=P12(s1,1)∑s1=0,1P12(s1,1),P(s1∣s2=0)=P12(s1,0)∑s1=0,1P12(s1,0)P(s_1 \mid s_2 = 1) = \frac{P_{12}(s_1, 1)}{\sum_{s_1 = 0,1}P_{12}(s_1, 1)}, \qquad P(s_1 \mid s_2 = 0) = \frac{P_{12}(s_1, 0)}{\sum_{s_1 = 0,1}P_{12}(s_1, 0)}
In words

capital P ( s one given s two equals 1) equals capital P sub 1 2 ( s one, 1) over the quantity the sum over s one equals 0,1 of capital P sub 1 2 ( s one, 1), capital P ( s one given s two equals 0) equals capital P sub 1 2 ( s one, 0) over the quantity the sum over s one equals 0,1 of capital P sub 1 2 ( s one, 0)

The denominator of the first is P2(1)P_2(1) and that of the second P2(0)P_2(0), by the rule for one variable alone. If the two conditional probabilities are the same, knowing s2s_2 tells us nothing about s1s_1.

Two dice examples#

Wen makes this concrete with a fair die (notes pp. 37–38). Let m=1,…,6m = 1, \ldots, 6 be the number it shows (the notes call it nn; we keep nn for the number of variables below), each with probability 1/61/6, and define two random variables from the same roll.

Example I (p. 37): s1=1s_1 = 1 if mm is even, s2=1s_2 = 1 if mm is a multiple of 3, and 0 otherwise. Then P1(1)=1/2P_1(1) = 1/2 and P2(1)=1/3P_2(1) = 1/3. The joint probabilities come from listing the faces: s1=s2=1s_1 = s_2 = 1 only for m=6m = 6, and so on.

s2=1s_2 = 1s2=0s_2 = 0
s1=1s_1 = 11/61/6 (6)1/31/3 (2, 4)
s1=0s_1 = 01/61/6 (3)1/31/3 (1, 5)

Given s2=1s_2 = 1, the probabilities of s1=1s_1 = 1 and s1=0s_1 = 0 are 1/61/6+1/6=12\frac{1/6}{1/6 + 1/6} = \frac{1}{2} and 12\frac{1}{2}; given s2=0s_2 = 0 they are 1/32/3=12\frac{1/3}{2/3} = \frac{1}{2} and 12\frac{1}{2} again. In the other direction, given s1=1s_1 = 1 the probabilities of s2=1s_2 = 1 and s2=0s_2 = 0 are 13\frac{1}{3} and 23\frac{2}{3}, and given s1=0s_1 = 0 the same. Knowing one variable never changes the odds of the other: Wen concludes that s1s_1 and s2s_2 are independent random variables. Indeed every entry of the table is the product of the separate probabilities, for example P12(1,1)=12×13=16P_{12}(1,1) = \frac{1}{2} \times \frac{1}{3} = \frac{1}{6}.

Example II (p. 38): now s1=1s_1 = 1 if m=1,2,3m = 1, 2, 3 and 0 if m=4,5,6m = 4, 5, 6, while s2=1s_2 = 1 if mm is even and 0 if it is odd. (The notes write "s2=1s_2 = 1" in both halves of the definition; the second must be s2=0s_2 = 0, which is what the table in the notes uses.) Each variable alone is 1 or 0 with probability 12\frac{1}{2}, but the joint table is lopsided:

s2=1s_2 = 1s2=0s_2 = 0
s1=1s_1 = 11/61/6 (2)1/31/3 (1, 3)
s1=0s_1 = 01/31/3 (4, 6)1/61/6 (5)

Given s2=1s_2 = 1, the probabilities of s1=1s_1 = 1 and s1=0s_1 = 0 are 1/61/2=13\frac{1/6}{1/2} = \frac{1}{3} and 23\frac{2}{3}; given s2=0s_2 = 0 they are 23\frac{2}{3} and 13\frac{1}{3}. These are not equal: an even roll makes a low roll less likely, because only one of the three even faces is low. The variables are not independent, although each alone is a fair coin.

Independence and correlation#

If s1s_1 and s2s_2 are independent, the joint probability can be built from the separate ones (notes p. 38, boxed):

Independent random variables
P12(s1,s2)=P1(s1) P2(s2)P_{12}(s_1, s_2) = P_1(s_1)\,P_2(s_2)
In words

capital P sub 1 2 ( s one, s two ) equals capital P one ( s one ) capital P two ( s two )

This is the same statement as before: with a product, the conditional probability P1(s1)P2(1)/∑P1(s1′)P2(1)=P1(s1)P_1(s_1)P_2(1)/\sum P_1(s_1')P_2(1) = P_1(s_1) does not depend on s2s_2. One consequence is that the average of the product is the product of the averages, because the double sum splits:

Average of a product of independent variables
⟨s1s2⟩=∑s1,s2s1s2 P1(s1)P2(s2)=(∑s1s1P1(s1))(∑s2s2P2(s2))=⟨s1⟩⟨s2⟩\langle s_1s_2\rangle = \sum_{s_1,s_2}s_1s_2\,P_1(s_1)P_2(s_2) = \Big(\sum_{s_1}s_1P_1(s_1)\Big)\Big(\sum_{s_2}s_2P_2(s_2)\Big) = \langle s_1\rangle\langle s_2\rangle
In words

the average of s one s two equals the sum over s one, s two of s one s two capital P one ( s one ) capital P two ( s two ) equals ( the sum over s one of s one capital P one ( s one ) ) ( the sum over s two of s two capital P two ( s two ) ) equals the average of s one the average of s two

For correlated random variables this fails, and the difference measures how strongly they go together. Wen defines (p. 38)

Correlation
⟨s1s2⟩−⟨s1⟩⟨s2⟩≡correlation between s1 and s2\langle s_1s_2\rangle - \langle s_1\rangle\langle s_2\rangle \equiv \text{correlation between } s_1 \text{ and } s_2
In words

the average of s one s two minus the average of s one the average of s two is defined as correlation between s one and s two

It is positive when the two tend to be large together, negative when one tends to be large while the other is small, and zero for independent variables. In Example II, s1s2=1s_1s_2 = 1 only for m=2m = 2, so ⟨s1s2⟩=16\langle s_1s_2\rangle = \frac{1}{6}, while ⟨s1⟩⟨s2⟩=12×12=14\langle s_1\rangle\langle s_2\rangle = \frac{1}{2} \times \frac{1}{2} = \frac{1}{4}: the correlation is 16−14=−112\frac{1}{6} - \frac{1}{4} = -\frac{1}{12}, negative because an even roll tends to be a high one. (The number is ours; the notes stop at the definition.) A zero correlation does not in general prove independence, since it tests only one average; for two variables that are each 0 or 1 it does, because then the single number ⟨s1s2⟩=P12(1,1)\langle s_1s_2\rangle = P_{12}(1,1) fixes the whole table once P1P_1 and P2P_2 are known.

Wen adds a box on a random force F(t)F(t), such as the kicks a dust grain gets from the molecules around it (p. 38; the notes call the time ss). Its value at one time and at a later time are two random variables. The average of their product, ⟨F(t)F(0)⟩\langle F(t)F(0)\rangle, is the correlation of the force with itself; for a long time difference the two values become independent, so it splits into ⟨F(t)⟩⟨F(0)⟩\langle F(t)\rangle\langle F(0)\rangle, which is zero for a force that averages to zero:

Correlation of a random force
⟨F(t)F(0)⟩→⟨F(t)⟩⟨F(0)⟩=0as t→∞\langle F(t)F(0)\rangle \to \langle F(t)\rangle\langle F(0)\rangle = 0 \quad\text{as } t \to \infty
In words

the average of F(t)F(0) goes to the average of F(t) the average of F(0) equals 0 as t goes to infinity

How quickly this correlation dies away is a property of the surroundings, and it will matter whenever fluctuating forces drive a system.

The binomial distribution#

Take nn independent random variables s1,…,sns_1, \ldots, s_n, each 1 with probability pp and 0 with probability 1−p1 - p (notes p. 39, point ③): nn tosses of a biased coin, or nn spins each up with probability pp. Because they are independent, the probability of one particular set of values is the product P(s1)P(s2)⋯P(sn)P(s_1)P(s_2)\cdots P(s_n). A set with kk ones and n−kn - k zeros has probability pk(1−p)n−kp^k(1 - p)^{n-k}, and there are (nk)=n!/[k!(n−k)!]\binom{n}{k} = n!/[k!(n - k)!] such sets, one for each choice of which kk variables are 1. So the probability that ∑isi=k\sum_i s_i = k is the binomial distribution

Binomial distribution
B(k;n,p)=n!k! (n−k)! pk(1−p)n−k=(nk)pk(1−p)n−kB(k; n, p) = \frac{n!}{k!\,(n - k)!}\,p^k(1 - p)^{n-k} = \binom{n}{k}p^k(1 - p)^{n-k}
In words

B(k; n, p) equals n factorial over the quantity k factorial the quantity n minus k, factorial, times p to the power k the quantity 1 minus p, all to the power n minus k, end of power, equals n choose k p to the power k the quantity 1 minus p, all to the power n minus k, end of power

Its average and second moment are (notes p. 39)

Mean and second moment of the binomial distribution
⟨k⟩=∑kk B(k;n,p)=np,⟨k2⟩=n2p2+np(1−p)\langle k\rangle = \sum_k k\,B(k; n, p) = np, \qquad \langle k^2\rangle = n^2p^2 + np(1 - p)
In words

the average of k equals the sum over k of k B(k; n, p) equals n p, the average of k squared equals n squared p squared plus n p the quantity 1 minus p

so the variance is ⟨k2⟩−⟨k⟩2=np(1−p)\langle k^2\rangle - \langle k\rangle^2 = np(1 - p), which is nn times the variance p(1−p)p(1 - p) of a single two-valued variable. The mean is intuitive, a fraction pp of the nn variables; the fluctuation Δk=np(1−p)\Delta k = \sqrt{np(1 - p)} grows only like n\sqrt n, so the relative fluctuation Δk/⟨k⟩=(1−p)/(np)\Delta k/\langle k\rangle = \sqrt{(1 - p)/(np)} shrinks like 1/n1/\sqrt n.

The binomial distribution for n=20n = 20, drawn as steps (each step is the probability of one whole number kk), computed from B(k;n,p)B(k; n, p), with the Gaussian of the same mean npnp and variance np(1−p)np(1 - p) dashed. At p=0.6p = 0.6 the largest step is k=12k = 12, with probability 0.180, and the Gaussian peaks at 0.182. Move the slider: the distribution shifts with npnp, and is widest at p=0.5p = 0.5.

Wen's trick for the averages#

The sums over kk can be done without any algebra on factorials (notes p. 39). Set x=p/(1−p)x = p/(1 - p) and define

Generating function
Z=(1+x)n=1+nx+n(n−1)2x2+⋯+(nk)xk+⋯Z = (1 + x)^n = 1 + nx + \frac{n(n - 1)}{2}x^2 + \cdots + \binom{n}{k}x^k + \cdots
In words

Z equals the quantity 1 plus x, all to the power n equals 1 plus n x plus n the quantity n minus 1, over 2, times x squared plus and so on plus n choose k x to the power k plus and so on

(The notes write the third term as n(n+1)2x2\frac{n(n + 1)}{2}x^2, a slip: the coefficient of x2x^2 is (n2)=n(n−1)2\binom{n}{2} = \frac{n(n - 1)}{2}.) The letter ZZ is suggestive: each term (nk)xk\binom{n}{k} x^k, divided by ZZ, is exactly the binomial probability,

Each term is a probability
1Z(nk)xk=(nk)(p/(1−p))k(1+p/(1−p))n=(nk)pk(1−p)n−k(1−p+p)n=B(k;n,p)\frac{1}{Z}\binom{n}{k}x^k = \binom{n}{k}\frac{(p/(1 - p))^k}{(1 + p/(1 - p))^n} = \binom{n}{k}\frac{p^k(1 - p)^{n-k}}{(1 - p + p)^n} = B(k; n, p)
In words

1 over Z, times n choose k x to the power k equals n choose k the quantity the quantity p over the quantity 1 minus p, all to the power k, all over the quantity the quantity 1 plus p over the quantity 1 minus p, all to the power n, equals n choose k p to the power k the quantity 1 minus p, all to the power n minus k, end of power, over the quantity 1 minus p plus p, all to the power n equals B(k; n, p)

so ZZ plays the part of a partition function, with xx in the role of a Boltzmann factor for each variable that is 1. As with a partition function, differentiating ln⁡Z\ln Z brings down the variable we want to average. The operator x ddxx\,\frac{d}{dx} turns xkx^k into kxkkx^k, so

Average from the generating function
xddxln⁡Z=1Z∑kk(nk)xk=⟨k⟩,⟨k⟩=x n1+x=npx\frac{d}{dx}\ln Z = \frac{1}{Z}\sum_k k\binom{n}{k}x^k = \langle k\rangle, \qquad \langle k\rangle = x\,\frac{n}{1 + x} = np
In words

x d over d x log Z equals 1 over Z, times the sum over k of k n choose k x to the power k equals the average of k, the average of k equals x n over the quantity 1 plus x, equals n p

Source: 8.08 Chapter V notes (Wen, handwritten, pp. 36–40), p. 39, point ③ (bottom)

where the last step uses x/(1+x)=px/(1 + x) = p. Wen ticks this result. The second moment follows the same way (this step is ours; the notes state only the result): applying x d/dxx\,d/dx once more to ln⁡Z\ln Z gives the variance,

Variance from the generating function
⟨k2⟩−⟨k⟩2=xddx(xddxln⁡Z)=xddxnx1+x=nx(1+x)2=np(1−p)\langle k^2\rangle - \langle k\rangle^2 = x\frac{d}{dx}\Big(x\frac{d}{dx}\ln Z\Big) = x\frac{d}{dx}\frac{nx}{1 + x} = \frac{nx}{(1 + x)^2} = np(1 - p)
In words

the average of k squared minus the average of k squared equals x d over d x (x d over d x log Z ) equals x d over d x n x over the quantity 1 plus x, equals n x over the quantity 1 plus x, all squared equals n p the quantity 1 minus p

Source: 8.08 Chapter V notes (Wen, handwritten, pp. 36–40), p. 39, point ③ (variance not derived in the notes)

since 1/(1+x)=1−p1/(1 + x) = 1 - p; adding ⟨k⟩2=n2p2\langle k\rangle^2 = n^2p^2 gives Wen's ⟨k2⟩\langle k^2\rangle. This is the same pattern as in the canonical ensemble, where one derivative of ln⁡Z\ln Z with respect to the inverse temperature gives the average energy and a second derivative gives its fluctuation.

The central limit theorem#

The last point of the chapter (notes p. 40, point ④) explains why the binomial distribution in the graph looks so much like a Gaussian. Take nn independent random variables x1,…,xnx_1, \ldots, x_n, all with the same distribution P(x)P(x), and form their mean

Mean of n variables
X=1n∑ixiX = \frac{1}{n}\sum_i x_i
In words

capital X equals 1 over n, times the sum over i of x sub i

The central limit theorem says that for n→∞n \to \infty the distribution of XX is Gaussian, whatever P(x)P(x) was (as long as its variance is finite; see the 8.044 page for the conditions of the theorem and the counterexample of the Lorentzian):

Gaussian distribution of the mean
PG(X)=12πσ2 e−(X−⟨X⟩)2/2σ2P_G(X) = \frac{1}{\sqrt{2\pi\sigma^2}}\,e^{-(X - \langle X\rangle)^2/2\sigma^2}
In words

capital P sub G ( capital X ) equals 1 over the square root of 2 pi sigma squared, times e to the power minus the quantity capital X minus the average of capital X, all squared over 2 sigma squared, end of power

(Wen writes σ\sigma for the variance itself, so his formula has σ\sigma where this one has σ2\sigma^2; we keep the usual convention that σ\sigma is the standard deviation.) The Gaussian is fixed by two numbers, and Wen finds both from the properties it must have: it is normalized, ∫dX PG(X)=1\int dX\,P_G(X) = 1; its average is that of XX; and its variance is that of XX. The average is easy. Each xix_i has the same average ⟨x⟩=∫dx x P(x)\langle x\rangle = \int dx\,x\,P(x), so the mean of nn of them has it too, ⟨X⟩=⟨x⟩\langle X\rangle = \langle x\rangle. For the variance, write X−⟨X⟩=1n∑i(xi−⟨x⟩)X - \langle X\rangle = \frac{1}{n}\sum_i(x_i - \langle x\rangle) and square:

Variance of the mean
σ2=1n2⟨(∑i(xi−⟨x⟩))2⟩=1n2∑i⟨(xi−⟨x⟩)2⟩+1n2∑i≠j⟨(xi−⟨x⟩)(xj−⟨x⟩)⟩\sigma^2 = \frac{1}{n^2}\Big\langle\Big(\sum_i(x_i - \langle x\rangle)\Big)^2\Big\rangle = \frac{1}{n^2}\sum_i\big\langle(x_i - \langle x\rangle)^2\big\rangle + \frac{1}{n^2}\sum_{i \ne j}\big\langle(x_i - \langle x\rangle)(x_j - \langle x\rangle)\big\rangle
In words

sigma squared equals 1 over n squared the average of ( the sum over i of the quantity x sub i minus the average of x, ) squared equals 1 over n squared, times the sum over i of the average of the quantity x sub i minus the average of x, all squared plus 1 over n squared, times the sum over i is not equal to j of the average of the quantity x sub i minus the average of x, the quantity x sub j minus the average of x

The cross terms vanish: for i≠ji \ne j the two variables are independent, so the average of the product is the product of the averages, and each average ⟨xi−⟨x⟩⟩\langle x_i - \langle x\rangle\rangle is zero. What is left is nn equal terms (notes p. 40, boxed):

Width of the Gaussian
σ2=1n⟨(x−⟨x⟩)2⟩\sigma^2 = \frac{1}{n}\big\langle(x - \langle x\rangle)^2\big\rangle
In words

sigma squared equals 1 over n the average of the quantity x minus the average of x, all squared

The mean of nn variables scatters about the true average with a standard deviation 1/n1/\sqrt n times that of a single variable. The binomial distribution is the special case where each xi=six_i = s_i is 0 or 1: k/nk/n is the mean XX, its variance is p(1−p)/np(1 - p)/n, and so kk itself is close to a Gaussian with mean npnp and variance np(1−p)np(1 - p), which is the dashed curve in the graph. Note that the argument for σ2\sigma^2 used only independence, and holds for every nn; what needs n→∞n \to \infty is the Gaussian shape.

Why large systems hardly fluctuate#

(This section goes beyond the notes.) This 1/n1/\sqrt n is the reason thermodynamics works. A macroscopic quantity, such as the energy or the magnetization of a body, is a sum over some 102210^{22} nearly independent parts. Its average grows like the number of parts and its fluctuation only like the square root, so the fluctuation relative to the average is of order 10−1110^{-11}, far below anything a thermometer or a magnetometer can see. The averages of statistical physics are then simply the measured values. The next chapter makes this precise for systems in thermal equilibrium.

Worked example

A twelve-sided die and a paramagnet

(a) Roll a fair twelve-sided die showing m=1,…,12m = 1, \ldots, 12. Let s1=1s_1 = 1 if m≤6m \le 6 and s2=1s_2 = 1 if mm is a prime number, each 0 otherwise. Find the joint probabilities, the probability of s1=1s_1 = 1 given s2=1s_2 = 1 and given s2=0s_2 = 0, and the correlation. Are the variables independent?

(b) A paramagnet has n=400n = 400 independent spins, each pointing up with probability p=0.6p = 0.6. Find the average number of up spins, its fluctuation, and the probability (in the Gaussian approximation) that 260 or more spins point up. How large is the relative fluctuation for 102210^{22} spins?

(a) The joint table

The primes up to 12 are 2, 3, 5, 7 and 11, so P2(1)=5/12P_2(1) = 5/12, and P1(1)=6/12=1/2P_1(1) = 6/12 = 1/2. Counting faces: P12(1,1)=3/12P_{12}(1,1) = 3/12 (2, 3, 5), P12(1,0)=3/12P_{12}(1,0) = 3/12 (1, 4, 6), P12(0,1)=2/12P_{12}(0,1) = 2/12 (7, 11) and P12(0,0)=4/12P_{12}(0,0) = 4/12 (8, 9, 10, 12). They add up to 12/12=112/12 = 1.

(a) Conditional probabilities and correlation

Given a prime, P(s1=1∣s2=1)=3/125/12=35=0.6P(s_1 = 1 \mid s_2 = 1) = \frac{3/12}{5/12} = \frac{3}{5} = 0.6; given a non-prime, P(s1=1∣s2=0)=3/127/12=37≈0.429P(s_1 = 1 \mid s_2 = 0) = \frac{3/12}{7/12} = \frac{3}{7} \approx 0.429. These differ, so the variables are not independent: primes are commoner among the low faces. The correlation is ⟨s1s2⟩−⟨s1⟩⟨s2⟩=312−12×512=124≈0.042\langle s_1s_2\rangle - \langle s_1\rangle\langle s_2\rangle = \frac{3}{12} - \frac{1}{2} \times \frac{5}{12} = \frac{1}{24} \approx 0.042, positive, as it should be.

(b) Mean and fluctuation

The number kk of up spins has the binomial distribution, so ⟨k⟩=np=400×0.6=240\langle k\rangle = np = 400 \times 0.6 = 240 and (Δk)2=np(1−p)=240×0.4=96(\Delta k)^2 = np(1 - p) = 240 \times 0.4 = 96, giving Δk≈9.80\Delta k \approx 9.80. The relative fluctuation is 9.80/240≈0.0419.80/240 \approx 0.041, about 4%.

(b) A large excess

In the Gaussian approximation, "260 or more" means k>259.5k > 259.5 (the step of k=260k = 260 starts half a unit below it), which is (259.5−240)/9.80≈1.99(259.5 - 240)/9.80 \approx 1.99 standard deviations above the mean. The Gaussian tail beyond that is 12 erfc(1.99/2)≈0.023\frac{1}{2}\,\text{erfc}(1.99/\sqrt2) \approx 0.023: about one chance in 43.

(b) A macroscopic magnet

For n=1022n = 10^{22} spins, Δk/⟨k⟩=(1−p)/(np)=0.4/(0.6×1022)≈8.2×10−12\Delta k/\langle k\rangle = \sqrt{(1 - p)/(np)} = \sqrt{0.4/(0.6 \times 10^{22})} \approx 8.2 \times 10^{-12}. The number of up spins is fixed to about eleven significant figures.

Summary#

  • A random variable ss is fixed by its distribution P(s)P(s), with ∑sP(s)=1\sum_s P(s) = 1. Average ⟨s⟩=∑sP(s)\langle s\rangle = \sum sP(s), moments ⟨sn⟩\langle s^n\rangle, fluctuation Δs=⟨s2⟩−⟨s⟩2\Delta s = \sqrt{\langle s^2\rangle - \langle s\rangle^2}.
  • Two random variables need a joint probability P12(s1,s2)P_{12}(s_1, s_2); summing over one gives the distribution of the other, and dividing a slice by its sum gives the conditional probability P(s1∣s2)P(s_1 \mid s_2).
  • They are independent when P12=P1P2P_{12} = P_1P_2, equivalently when the conditional probability of one does not depend on the other. Then ⟨s1s2⟩=⟨s1⟩⟨s2⟩\langle s_1s_2\rangle = \langle s_1\rangle\langle s_2\rangle; the correlation ⟨s1s2⟩−⟨s1⟩⟨s2⟩\langle s_1s_2\rangle - \langle s_1\rangle\langle s_2\rangle measures the departure.
  • The number of ones among nn independent variables that are 1 with probability pp has the binomial distribution B(k;n,p)=(nk)pk(1−p)n−kB(k; n, p) = \binom{n}{k} p^k(1 - p)^{n-k}, with ⟨k⟩=np\langle k\rangle = np and variance np(1−p)np(1 - p); Wen gets them from Z=(1+x)nZ = (1 + x)^n with x=p/(1−p)x = p/(1 - p), like averages from a partition function.
  • Central limit theorem: the mean XX of nn independent, identically distributed variables becomes Gaussian for large nn, with average ⟨x⟩\langle x\rangle and variance 1n⟨(x−⟨x⟩)2⟩\frac{1}{n}\langle(x - \langle x\rangle)^2\rangle. Relative fluctuations fall like 1/n1/\sqrt n, which is why macroscopic quantities are sharp.

Symbols on this page

Show the 44 symbols used here
Δ\Delta capital delta.
A change or difference in a quantity, e.g. Δx = x₂ − x₁. Say it: “capital delta”.
π\pi pi.
The ratio of a circle's circumference to its diameter, π ≈ 3.14159. Say it: “pi”.
σ\sigma sigma.
The standard deviation of the Gaussian distribution of the mean X; σ² is its variance (the notes write σ for the variance). Say it: “sigma”.
∞\infty infinity.
Infinity: larger than any number. Say it: “infinity”.
≈\approx approximately equal.
Is approximately equal to. Say it: “is approximately”.
≡\equiv identical to.
Is defined as (or is identically equal to). Say it: “is defined as”.
≤\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”.
→\to arrow.
Goes to (tends to), or becomes. Say it: “goes to”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⟨\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”.
ln⁡\ln natural logarithm.
Natural logarithm (base e ≈ 2.718). Say it: “log”.
kk k.
The number of variables equal to 1, k = Σ sᵢ; in the binomial coefficient, the number chosen. Say it: “k”.
xx x.
In the binomial section, the ratio x = p/(1 − p); in the central limit theorem, one random variable with distribution P(x) and average ⟨x⟩. Say it: “x”.
tt t.
The time between the two values of the random force (the notes call it s). Unit: s. Say it: “t”.
dd d.
The d of an integral or derivative. 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 random variables (coin tosses, spins); in ⟨sⁿ⟩, the order of the moment. Say it: “n”.
ee e.
Euler's number, e ≈ 2.718, the base of the exponential. Say it: “e”.
mm m.
The number a die shows (the notes call it n). Say it: “m”.
FF F.
A random force, such as the kicks of molecules on a dust grain; ⟨F(t)F(0)⟩ is its correlation between times 0 and t. Unit: N. Say it: “F”.
PP P.
The probability distribution of a random variable: P(s) is the probability that s takes the value s; in the central limit theorem, P(x) is the distribution of each xᵢ. Say it: “capital P”.
BB B.
The binomial distribution B(k; n, p): the probability of k ones among n independent variables that are each 1 with probability p. Say it: “B”.
ss s.
A random variable with discrete values; ⟨s⟩ is its average, ⟨sⁿ⟩ its moments and Δs its fluctuation. Say it: “s”.
pp p.
The probability that one variable equals 1, P(sᵢ = 1) = p. Say it: “p”.
x1x_{1} x 1.
The first of the n random variables x₁, …, xₙ. Say it: “x one”.
ZZ Z.
The generating function Z = (1 + x)ⁿ of the binomial distribution, which plays the part of a partition function. Say it: “Z”.
XX X.
The mean X = (1/n) Σ xᵢ of n independent random variables. Say it: “capital X”.
xnx_{n} x n.
The last of the n random variables x₁, …, xₙ. Say it: “x sub n”.
s1s_{1} s one.
The first of two random variables, each 0 or 1 (in s₁, …, sₙ, the first of n). Say it: “s one”.
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”.
sns_{n} s n.
The last of the n random variables s₁, …, sₙ. Say it: “s sub n”.
P1P_{1} P 1.
The probability distribution of s₁ alone, whatever s₂ is. Say it: “capital P one”.
P2P_{2} P 2.
The probability distribution of s₂ alone, whatever s₁ is. Say it: “capital P two”.
sis_{i} s sub i.
The ith of n independent random variables, 1 with probability p and 0 otherwise. Say it: “s sub i”.
P12P_{12} P 1 2.
The joint probability P₁₂(s₁, s₂) that s₁ and s₂ take the given values together. Say it: “capital P sub 1 2”.
s2s_{2} s two.
The second of two random variables, each 0 or 1 (in s₁, s₂, …, the second of n). Say it: “s two”.
PGP_{G} P G.
The Gaussian distribution P_G(X) that the mean X of many independent variables approaches. Say it: “capital P sub G”.
∣\mid given.
Given: P(s₁ | s₂ = 1) is the probability of s₁ given that s₂ = 1, a conditional probability. Say it: “given”.
(nk)\binom{n}{k} binomial coefficient.
The binomial coefficient: (n k) = n!/[k!(n − k)!], read "n choose k", the number of ways to choose k things out of n. Say it: “choose”.

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

Words on this page

Show the 63 words used here

New here

binomial distribution.
The probabilities of getting each possible number of successes in a fixed number of independent tries, each with the same chance of success.
moment.
In probability, the average of a power of a random quantity: the first moment is its mean, the second the mean of its square.
joint probability.
The probability of two or more random quantities taking particular values together; it holds everything about how they are linked.
independent random variables.
Random quantities that have no influence on each other: knowing the value of one never changes the probabilities of the other.
correlation.
How strongly two quantities tend to vary together; for random quantities, the average of their product minus the product of their averages.
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.

Also used

statistical mechanics.
The branch of physics that explains the large-scale behaviour of matter, such as temperature and pressure, from the laws governing its atoms, using probability. Explained in Thermodynamic variables, temperature and work.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
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.
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. Explained in Probability: sums of random variables and the central limit theorem.
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.
probability density.
Probability per unit length, area or volume: multiplied by a small interval, it gives the chance that the value falls there. Explained in Normalization, Hermitian operators and the probability current.
integral.
A sum of very many very small pieces, such as the area under a graph; it undoes taking a derivative. Explained in Rates of change and area under a graph.
fluctuation.
A departure of a quantity from its average value, usually small and random, from moment to moment or from place to place. Explained in Zero-point energy, fluctuations and surprises.
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.
integration.
Finding an integral: adding up very many small pieces, or finding an antiderivative. Explained in Differentials and antiderivatives.
proportional.
Of two quantities: always in the same ratio, so that doubling one doubles the other. Explained in Graphs, straight lines and slope.
conditional density.
The probability, or probability density, of one quantity once the value of another is known. Explained in Probability: two or more random variables.
spin.
The built-in angular momentum of a particle such as an electron, which it has even at rest: a whole or half-whole multiple of ħ. Explained in Central potentials and angular momentum.
factorial.
The product of all the whole numbers from 1 up to n, written n!; for example 4! = 24. Explained in The chain rule and higher derivatives.
partition function.
The sum of the Boltzmann factors of all a system's states; once known, it gives every thermodynamic property of the system. Explained in Refrigerators, the third law and the canonical ensemble.
Boltzmann factor.
The factor e^(−E/kT) that sets how likely a state of energy E is at temperature T, relative to other states. Explained in The canonical ensemble and the free energy.
differentiation.
Finding a derivative: working out how fast a function changes. Explained in The derivative: slope of the tangent line and rate of change.
operator.
A rule that acts on a function, vector or state and turns it into another one, such as 'take the derivative'. Explained in The chain rule and higher derivatives.
canonical ensemble.
The description of a system kept at a fixed temperature by contact with a large bath, with a fixed number of particles but varying energy. Explained in Refrigerators, the third law and the canonical ensemble.
derivative.
The rate at which a function changes as its input changes: the slope of its graph at a point. Explained in Position and velocity in one dimension.
with respect to.
Taking that variable as the one that changes: a derivative with respect to t measures change as t changes, others held fixed. Explained in Average value, weighted averages and probability.
inverse.
Of a quantity or unit: one divided by it. Inverse seconds (1/s) mean per second, and the inverse of a rate is a time.
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.
second derivative.
The derivative of a derivative: how fast a rate of change itself is changing. Explained in Acceleration in one dimension.
graph.
The picture of a function: the curve y = f(x) for one variable, or the surface z = f(x, y) for two. Explained in Graphs, straight lines and slope.
Gaussian.
The bell-shaped curve e to the minus x squared, or a quantity spread out with that shape; also called a normal distribution. Explained in Probability: sums of random variables and the central limit theorem.
theorem.
A statement that has been proved true, step by step, from definitions and earlier results. Explained in Limits and continuity.
Lorentzian.
A peaked curve of the form 1/(x² + a²), with much longer tails than a bell curve; also called a Cauchy density. Explained in Probability: sums of random variables and the central limit theorem.
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.
scatter.
The spread of measured values about their average or about a trend; a large scatter means individual cases differ widely. Explained in Dark matter halos: mass, profile, concentration, shape and spin.
thermodynamics.
The study of heat, work, temperature and energy in large systems, through general laws that do not depend on what the system is made of. Explained in Thermodynamic variables, temperature and work.
macroscopic.
Large enough to see and measure directly, or describing a whole system rather than its single atoms, such as pressure or temperature. Explained in Thermodynamic variables, temperature and work.
magnetization.
The magnetic dipole moment per unit volume of a material, from its atomic magnets lining up. Explained in Magnetic fields and magnetic force.
thermal equilibrium.
A state in which energy is shared out evenly and nothing changes on average, so the system can be described by a single temperature. Explained in Temperature and thermal energy.
paramagnetic.
Of a material: weakly pulled into a magnetic field, because the field partly lines up its atoms' own small magnets. Explained in Levitation and Ampère's law.
galaxy.
A huge system of stars, gas and dust, from thousands to over a trillion stars, held together by gravity inside a dark matter halo. Explained in Towards the universe: weighing the Sun and the Galaxy with orbits.
statistics.
The mathematics of data and chance, or the averages, spreads and other numbers that describe how a random quantity behaves. Explained in Measuring structure: the power spectrum and the correlation function.
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.
power spectrum.
How strong the ripples of the density of matter are on each scale of size, the quantity that measures how galaxies cluster.
two-point correlation function.
How much more likely than by chance it is to find two galaxies a given distance apart: zero for random placing, positive for clustering. Explained in Measuring structure: the power spectrum and the correlation function.
density contrast.
How much denser or thinner than average a region is, as a fraction of the average density. Explained in How small ripples grow: linear perturbation theory.
Press–Schechter.
A simple method for predicting how many dark matter halos of each mass exist, from the statistics of the smoothed early density ripples. Explained in How many halos? The Press–Schechter mass function.
halo.
A large, roughly round cloud of dark matter, held together by its own gravity, inside which a galaxy or a cluster of galaxies sits. Explained in When ripples collapse: the spherical collapse model.

Academic

citation.
A note saying exactly where a statement, number or formula comes from, so readers can check it.
likewise.
In the same way; similarly.
intuitive.
Easy to understand or believe at once, without detailed reasoning.
suggestive.
Hinting strongly at something without proving it.
counterexample.
A single case showing that a general claim is false.
convention.
An agreed choice, such as which direction counts as positive, that could have been made differently.
vanish.
To become zero; sometimes, of a fixed point or solution, to stop existing.
special case.
One particular example of a general rule, obtained by fixing some of its quantities.
argument.
A chain of reasoning that leads to a conclusion; in maths also the input of a function, such as x in sin x.
of order.
Roughly equal to, within a factor of a few; of order one means neither much bigger nor much smaller than one.
approximation.
Close to, but not exactly, the true value; an approximation is such a value or formula, chosen because it is simpler.
significant.
In 'significant figures': the digits of a number that carry real information about its value.
identically.
In exactly the same way; in maths, for every value of the variable, as when a function is zero everywhere.

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

2 more cosmology pages that build on this

Pages that build on this

Practise

Check your understanding

  1. Two random variables that take the values 0 and 1 have the joint probabilities P12(1,1)=0.3P_{12}(1,1) = 0.3, P12(1,0)=0.2P_{12}(1,0) = 0.2, P12(0,1)=0.1P_{12}(0,1) = 0.1, P12(0,0)=0.4P_{12}(0,0) = 0.4. What is the probability that s1=1s_1 = 1 given that s2=1s_2 = 1?
  2. Fifty independent variables each equal 1 with probability p=0.2p = 0.2 and 0 otherwise. What are the mean and the fluctuation Δk\Delta k of the number kk of ones?
  3. Each of 100 independent variables xix_i has variance ⟨(x−⟨x⟩)2⟩=4\langle(x - \langle x\rangle)^2\rangle = 4. What is the standard deviation of their mean X=1n∑ixiX = \frac{1}{n}\sum_i x_i?
  4. Why is ⟨s1s2⟩=⟨s1⟩⟨s2⟩\langle s_1s_2\rangle = \langle s_1\rangle\langle s_2\rangle for independent random variables?
0 of 4 answered

Flashcards

1 / 5