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 is a quantity whose value is not fixed but comes with a probability: is the probability that it takes the value (notes p. 36, point ①). The probabilities of all possible values add up to one:
In words
the sum over s of capital P (s) equals 1
The distribution says everything there is to know about . Two kinds of number summarize it. The average and, more generally, the moments are
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 , the typical distance of from its average, is the square root of the average squared distance:
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: , since is a fixed number that comes out of the average. The square is the variance. For example, if is 1 with probability and 0 otherwise, then and, since , also ; so . 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 and , each of which can be 0 or 1 (notes p. 36, point ②). Each has its own distribution: is the probability that , and ; likewise and for .
What is the probability that and ? It is tempting to answer , 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 , one number for each pair of values, boxed in the notes. Its four values add up to one:
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 , whatever is, is the sum over both values of :
In words
capital P one (1) equals capital P sub 1 2 (1,1) plus capital P sub 1 2 (1,0)
In general : 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: and together have two free numbers, has three.
Conditional probability#
Suppose we are told that . What is now the probability of each value of (notes p. 37)? Only the outcomes with are left, so the new probability is proportional to . Dividing by the sum over makes it add up to one again. This is the conditional probability, which Wen writes "P if s₂ = 1" of and we write in the usual way with a bar, read "given":
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 and that of the second , by the rule for one variable alone. If the two conditional probabilities are the same, knowing tells us nothing about .
Two dice examples#
Wen makes this concrete with a fair die (notes pp. 37–38). Let be the number it shows (the notes call it ; we keep for the number of variables below), each with probability , and define two random variables from the same roll.
Example I (p. 37): if is even, if is a multiple of 3, and 0 otherwise. Then and . The joint probabilities come from listing the faces: only for , and so on.
| (6) | (2, 4) | |
| (3) | (1, 5) |
Given , the probabilities of and are and ; given they are and again. In the other direction, given the probabilities of and are and , and given the same. Knowing one variable never changes the odds of the other: Wen concludes that and are independent random variables. Indeed every entry of the table is the product of the separate probabilities, for example .
Example II (p. 38): now if and 0 if , while if is even and 0 if it is odd. (The notes write "" in both halves of the definition; the second must be , which is what the table in the notes uses.) Each variable alone is 1 or 0 with probability , but the joint table is lopsided:
| (2) | (1, 3) | |
| (4, 6) | (5) |
Given , the probabilities of and are and ; given they are and . 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 and are independent, the joint probability can be built from the separate ones (notes p. 38, boxed):
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 does not depend on . One consequence is that the average of the product is the product of the averages, because the double sum splits:
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)
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, only for , so , while : the correlation is , 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 fixes the whole table once and are known.
Wen adds a box on a random force , such as the kicks a dust grain gets from the molecules around it (p. 38; the notes call the time ). Its value at one time and at a later time are two random variables. The average of their product, , is the correlation of the force with itself; for a long time difference the two values become independent, so it splits into , which is zero for a force that averages to zero:
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 independent random variables , each 1 with probability and 0 with probability (notes p. 39, point ③): tosses of a biased coin, or spins each up with probability . Because they are independent, the probability of one particular set of values is the product . A set with ones and zeros has probability , and there are such sets, one for each choice of which variables are 1. So the probability that is the binomial distribution
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)
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 , which is times the variance of a single two-valued variable. The mean is intuitive, a fraction of the variables; the fluctuation grows only like , so the relative fluctuation shrinks like .
Wen's trick for the averages#
The sums over can be done without any algebra on factorials (notes p. 39). Set and define
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 , a slip: the coefficient of is .) The letter is suggestive: each term , divided by , is exactly the binomial probability,
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 plays the part of a partition function, with in the role of a Boltzmann factor for each variable that is 1. As with a partition function, differentiating brings down the variable we want to average. The operator turns into , so
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
where the last step uses . Wen ticks this result. The second moment follows the same way (this step is ours; the notes state only the result): applying once more to gives the variance,
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
since ; adding gives Wen's . This is the same pattern as in the canonical ensemble, where one derivative of 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 independent random variables , all with the same distribution , and form their mean
In words
capital X equals 1 over n, times the sum over i of x sub i
The central limit theorem says that for the distribution of is Gaussian, whatever 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):
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 for the variance itself, so his formula has where this one has ; we keep the usual convention that is the standard deviation.) The Gaussian is fixed by two numbers, and Wen finds both from the properties it must have: it is normalized, ; its average is that of ; and its variance is that of . The average is easy. Each has the same average , so the mean of of them has it too, . For the variance, write and square:
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 the two variables are independent, so the average of the product is the product of the averages, and each average is zero. What is left is equal terms (notes p. 40, boxed):
In words
sigma squared equals 1 over n the average of the quantity x minus the average of x, all squared
The mean of variables scatters about the true average with a standard deviation times that of a single variable. The binomial distribution is the special case where each is 0 or 1: is the mean , its variance is , and so itself is close to a Gaussian with mean and variance , which is the dashed curve in the graph. Note that the argument for used only independence, and holds for every ; what needs is the Gaussian shape.
Why large systems hardly fluctuate#
(This section goes beyond the notes.) This is the reason thermodynamics works. A macroscopic quantity, such as the energy or the magnetization of a body, is a sum over some 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 , 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.
A twelve-sided die and a paramagnet
(a) Roll a fair twelve-sided die showing . Let if and if is a prime number, each 0 otherwise. Find the joint probabilities, the probability of given and given , and the correlation. Are the variables independent?
(b) A paramagnet has independent spins, each pointing up with probability . 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 spins?
(a) The joint table
The primes up to 12 are 2, 3, 5, 7 and 11, so , and . Counting faces: (2, 3, 5), (1, 4, 6), (7, 11) and (8, 9, 10, 12). They add up to .
(a) Conditional probabilities and correlation
Given a prime, ; given a non-prime, . These differ, so the variables are not independent: primes are commoner among the low faces. The correlation is , positive, as it should be.
(b) Mean and fluctuation
The number of up spins has the binomial distribution, so and , giving . The relative fluctuation is , about 4%.
(b) A large excess
In the Gaussian approximation, "260 or more" means (the step of starts half a unit below it), which is standard deviations above the mean. The Gaussian tail beyond that is : about one chance in 43.
(b) A macroscopic magnet
For spins, . The number of up spins is fixed to about eleven significant figures.
Summary#
- A random variable is fixed by its distribution , with . Average , moments , fluctuation .
- Two random variables need a joint probability ; summing over one gives the distribution of the other, and dividing a slice by its sum gives the conditional probability .
- They are independent when , equivalently when the conditional probability of one does not depend on the other. Then ; the correlation measures the departure.
- The number of ones among independent variables that are 1 with probability has the binomial distribution , with and variance ; Wen gets them from with , like averages from a partition function.
- Central limit theorem: the mean of independent, identically distributed variables becomes Gaussian for large , with average and variance . Relative fluctuations fall like , which is why macroscopic quantities are sharp.