Login
📚 Statistical Inference for Everyone
Chapters ▾

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)

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

Sequences of Heads and Tails

Now we can return to our original question,

Probability of flipping h heads and t tails Given the probability of flipping a single heads as 1/2, and the total number of flips is N=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

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

( N h ) N ! h ! ( N h ) !

Shown in Figure 3.1 is the probability of flipping h heads in 30 flips, for each value of h from h=0 (no heads or, in other words, 30 tails) up to h=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 h 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.