ChemWarden Learn

Mathematics for Chemists / Statistics and data

Probability and the random walk

Probability rules, distributions and the random walk as a model for diffusion and polymer chains.

Undergrad

In a nutshell

Many chemical processes are built from huge numbers of random events. A molecule in a liquid is jostled by its neighbours billions of times a second, each time moving a tiny step in a random direction. A long polymer chain is made of links that each point in a more or less random direction. Probability lets us predict the overall result even though no single step can be predicted. The random walk is the simplest model: take steps of fixed length in random directions, and ask how far you get. On average you do not go anywhere, because forward and backward steps cancel, but the typical distance from the start grows as the square root of the number of steps. This one result explains how diffusion works, how big a polymer coil is, and the size of mass-spectrum isotope peaks.

Probability rules

For outcomes that exclude each other, probabilities add: P(A \text{ or } B) = P(A) + P(B). For independent events they multiply: P(A \text{ and } B) = P(A)P(B). A distribution must be normalised, \sum_i P_i = 1 or \int p(x)\,\mathrm dx = 1, and averages are weighted sums: \langle x\rangle = \sum_i x_iP_i, \langle x^2\rangle = \sum_i x_i^2P_i.

The binomial distribution

If each of N independent trials succeeds with probability p, the probability of exactly n successes is

P(n) = \binom{N}{n}p^n(1-p)^{N-n}, \qquad \binom{N}{n} = \frac{N!}{n!(N-n)!}.

The binomial coefficient counts the arrangements. The mean is Np and the variance Np(1-p).

Worked example: the M+1 peak. Carbon-13 makes up about 1.1% of natural carbon. For benzene, C_6H_6, the probability of exactly one ^{13}C is 6 \times 0.011 \times 0.989^5 \approx 0.062, while having none is 0.989^6 \approx 0.936. The M+1/M ratio is therefore about 6.7%, roughly 1.1% per carbon, which is how the number of carbon atoms is estimated from a mass spectrum.

Spin populations. With p = \tfrac12, the binomial distribution gives the relative numbers of spin arrangements. For three equivalent neighbouring protons the weights 1 : 3 : 3 : 1 produce the familiar NMR quartet: Pascal's triangle is the binomial coefficients.

Large numbers and Stirling's approximation

For large N, factorials are handled with \ln N! \approx N\ln N - N. The binomial distribution then becomes sharply peaked: its relative width is \sqrt{Np(1-p)}/Np \propto 1/\sqrt N. For N \sim 10^{23} fluctuations are utterly negligible, which is why thermodynamics works with definite values. Counting arrangements in this way is the basis of Boltzmann's S = k_\mathrm B\ln W.

The one-dimensional random walk

Take N steps of length l, each equally likely to be +l or -l. The position is x = \sum_i s_i. Because \langle s_i\rangle = 0, \langle x\rangle = 0. For the mean square,

\langle x^2\rangle = \sum_i\langle s_i^2\rangle + \sum_{i\neq j}\langle s_is_j\rangle = Nl^2,

since different steps are uncorrelated and the cross terms average to zero. The root-mean-square displacement is

x_\text{rms} = l\sqrt N.

The same result holds in three dimensions for randomly oriented steps.

Diffusion

If a molecule makes a step every \tau, then N = t/\tau and \langle x^2\rangle = (l^2/\tau)t. Comparing with the diffusion equation result in one dimension, \langle x^2\rangle = 2Dt, gives the Einstein–Smoluchowski relation D = l^2/2\tau; in three dimensions \langle r^2\rangle = 6Dt. Distance grows as \sqrt t, so diffusion is fast over micrometres but slow over centimetres.

Polymer chains

A freely jointed chain of N bonds of length l is a random walk in space. Its root-mean-square end-to-end distance is l\sqrt N, far smaller than the contour length Nl. A chain of 10 000 bonds is only about 100 bond lengths across. Real chains are larger, because bond angles and the excluded volume of the chain (it cannot pass through itself) introduce correlations between steps.

Key points

  • Probabilities of mutually exclusive outcomes add; those of independent events multiply.
  • Binomial: P(n) = \binom{N}{n}p^n(1-p)^{N-n}, with mean Np; it underlies isotope patterns and NMR multiplets.
  • For a random walk \langle x\rangle = 0 but \langle x^2\rangle = Nl^2, so x_\text{rms} = l\sqrt N.
  • Diffusion is a random walk: \langle x^2\rangle = 2Dt in 1D and \langle r^2\rangle = 6Dt in 3D.
  • A freely jointed polymer chain has end-to-end distance l\sqrt N, much less than its contour length.

Check yourself

5 questions

  1. 1Two fair coins are tossed. What is the probability that both show heads?

  2. 2What is the average displacement after many steps of a symmetric one-dimensional random walk?

  3. 3A molecule makes 10^6 random steps of 0.3 nm. What is its rms displacement?

  4. 4Why does a CH_2 group next to a CH_3 appear as a quartet with intensities 1 : 3 : 3 : 1?

  5. 5If the diffusion distance of a molecule doubles, the time required:

Read more

Recent preprints on this topic

  1. Loading…

Matched by keyword from ChemRxiv via Crossref. Not peer-reviewed; read critically.