Statistical Inference for EveryoneXYZ Homework Edition

⇩ Download ▾

3.2 Coin Flipping

We'll start with some simple examples of coin flipping, asking some simple questions, and move to more complex observations and unintuitive conclusions.

Counting the Rearrangements

We are going to determine the answer to our question in small steps.

First, we ask,

C ( N ) = N × ( N 1 ) × × 2 × 1 = N ! (3.1) \begin{eqnarray} \nonumber C(N)&=&N\times (N-1) \times \cdots \times 2 \times 1 \\ &=&N! \label{eq:rearrangements_unique} \end{eqnarray}

Number of Rearrangements of NN Unique Symbols where we've introduced the notation for the factorial of NN as N!N!.

Sequences of Heads and Tails

Now we can return to our original question,

Probability of flipping hh heads and tt tails Given the probability of flipping a single heads as 1/2, and the total number of flips is N=h+tN=h+t, we have the following equivalent forms:

P ( h , t ) = ( h + t ) ! h ! t ! × ( 1 2 ) h × ( 1 2 ) t (3.2) P ( h , N ) = N ! h ! ( N h ) ! × ( 1 2 ) h × ( 1 2 ) N h P ( h , N ) = ( N h ) × ( 1 2 ) h × ( 1 2 ) N h \begin{eqnarray} P(h,t)&=&\frac{(h+t)!}{h!t!}\times \left(\frac{1}{2}\right)^{h}\times \left(\frac{1}{2}\right)^{t}\\\label{eq:prob_heads} \nonumber P(h,N)&=&\frac{N!}{h!(N-h)!}\times \left(\frac{1}{2}\right)^{h}\times \left(\frac{1}{2}\right)^{N-h} \\ \nonumber P(h,N)&=&\binom{N}{h}\times \left(\frac{1}{2}\right)^{h}\times \left(\frac{1}{2}\right)^{N-h} \end{eqnarray}

where we have introduced the notation that is sometimes used, called choose, read as “N choose h,”

( N h ) N ! h ! ( N h ) ! \begin{eqnarray*} \binom{N}{h}&\equiv&\frac{N!}{h!(N-h)!} \end{eqnarray*}

Shown in Figure 3.1 is the probability of flipping hh heads in 30 flips, for each value of hh from h=0h=0 (no heads or, in other words, 30 tails) up to h=30h=30 (all 30 heads). Clearly the most likely value is 15, but all of the numbers from 12 up to 18 have significant probability.

Dotted curve of the probability of getting h heads in 30 flips of a fair coin. The distribution is bell-shaped, peaks at 15 heads with probability about 0.145, and is negligible below 5 or above 25 heads.
Figure 3.1. Probability of getting hh heads in 30 flips. Clearly the most likely value is 15, but all of the numbers from 12 up to 18 have significant probability.

Adapted from Statistical Inference for Everyone, by Brian Blais (Bryant University), licensed under CC BY-SA 4.0 (dual-licensed under the GNU FDL 1.2 or later; this adaptation uses the CC BY-SA grant). Changes were made; this adaptation is distributed under the same license. License: CC-BY-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.