# Binomial coefficients and probability

Reference: Daniel V. Schroeder, An Introduction to Thermal Physics, (Addison-Wesley, 2000) – Problems 2.1 – 2.4.

As a prelude to the second law of thermodynamics (the one about entropy) we need to build up to it by discussing some elementary probability. The situation most commonly used to introduce this topic is that of flipping coins.

Suppose we have four fair (that is, equally likely to land heads or tails) distinguishable coins. If we flip all four, there are ${2^{4}=16}$ possible outcomes, since each coin has two possible states and the four coins are independent of each other. Each of these states is called a microstate. On the other hand, we might be interested only in the total number of heads or tails, and not in precisely which coins came up in either state. In this case, we’d be interested only in the macrostate of the collection of the four coins.

Example 1 For these 4 coins, the possible microstates are as shown

 Coin 1 Coin 2 Coin 3 Coin 4 H H H H H H H T H H T H H H T T H T H H H T H T H T T H H T T T T H H H T H H T T H T H T H T T T T H H T T H T T T T H T T T T

To make things easier to list, I’ve converted the four coin states into binary numbers with ${H=0}$ and ${T=1}$, then just listed the binary numbers from 0 up to 15.

The macrostates and their probabilities are

 # of heads # of microstates probability 0 1 ${\frac{1}{16}}$ 1 4 ${\frac{1}{4}}$ 2 6 ${\frac{3}{8}}$ 3 4 ${\frac{1}{4}}$ 4 1 ${\frac{1}{16}}$

In general, we can work out the probability of getting ${n}$ heads in a total of ${N}$ coin flips. We can think of the problem as the number of ways of selecting ${n}$ coins from a total of ${N}$, and making these ${n}$ coins the heads with the remaining ${N-n}$ tails. For the first of the ${n}$ coins, we have ${N}$ to choose from, so there are ${N}$ ways of making this first selection. With that first coin chosen, there are ${N-1}$ coins from which we can choose the next head, and so on, down to choosing the last head, for which we have ${N-n+1}$ choices. Thus the number of ways of choosing ${n}$ coins from ${N}$ in which the order of the choice does matter is

$\displaystyle N\left(N-1\right)\ldots\left(N-n+1\right)=\frac{N!}{\left(N-n\right)!} \ \ \ \ \ (1)$

However, for a given macrostate, the order in which we choose the heads doesn’t matter, and there are ${n!}$ ways of ordering each of the macrostates, so the actual number of ways of choosing the macrostate with ${n}$ heads is

$\displaystyle \Omega\left(N,n\right)=\frac{N!}{\left(N-n\right)!n!}=\binom{N}{n} \ \ \ \ \ (2)$

That is, ${\Omega\left(N,n\right)}$ is the binomial coefficient ${\binom{N}{n}}$. From the above table, we can see that with ${N=4}$, the entries in the second column are indeed the binomial coefficient ${\binom{4}{n}}$ for ${n=0,\ldots,4}$.

Example 2 Now suppose we flip 20 coins. The total number of microstates is now ${2^{20}=1,048,576}$. The probability of getting any one precise sequence of heads and tails is therefore ${\frac{1}{1048576}}$ or about 1 in a million. The probability of getting the macrostate of 12 heads and 8 tails, regardless of order, is

$\displaystyle \frac{1}{1048576}\binom{20}{12}=\frac{125970}{1048576}=0.12 \ \ \ \ \ (3)$

Example 3 Now we’ve got 50 coins. The number of microstates is ${2^{50}\approx1.126\times10^{15}}$. The number of microstates in, and probabilities of a few macrostates are:

 # of heads # of microstates probability 25 ${1.264\times10^{14}}$ 0.112 30 ${4.713\times10^{13}}$ 0.042 40 ${1.027\times10^{10}}$ ${9.1\times10^{-6}}$ 50 1 ${8.88\times10^{-16}}$

The probability drops off quite sharply when we get further away from the midpoint, with equal numbers of heads and tails. A plot of the probability shows this quite nicely:

Example 4 The binomial coefficient applies to any situation in which we need to select a subset of ${n}$ objects from a larger set of ${N}$, and the order doesn’t matter. For example, the number of different 5-card poker hands selected from a standard deck of 52 cards is

$\displaystyle \binom{52}{5}=2,598,960 \ \ \ \ \ (4)$

A royal flush consists of the top 5 ranking cards (ace, king, queen, jack and 10), all in the same suit. There are 4 such hands, so the probability of being dealt a royal flush is

$\displaystyle \frac{4}{2,598,960}=1.54\times10^{-6} \ \ \ \ \ (5)$

## 3 thoughts on “Binomial coefficients and probability”

1. Pingback: Einstein solid | Physics pages

2. Benjo

I think in example 3 is a typo: the probability of 50 times of head is 8.88×10^-16.