Coin Probabilities

Let P_n(m) be the probability of getting m heads when you throw n coins. Then some counting techniques (combinatorics) gives

  P_n(m)=\dfrac{n!}{m!(n-m)!2^n}

where n! (pronounced “en factorial”) means multiply the numbers from 1 to n. To see the validity of this formula apply it to cases where n is small and you know the answers. For example, when n=1, then

  P_1(1)=\dfrac{1!}{1!(1-1)!2^1}=\dfrac{1}{1\times 0!\times2}=\dfrac{1}{2}

and

  P_1(0)=\dfrac{1!}{0!(1-0)!2^1}=\dfrac{1}{2},

because 0!=1. The first equation says that the probability of getting a head when tossing a single coin is 0.5 or 50% and that of getting a tail (zero head means a tail) is also 50%.

For two coins, there are three probabilities:

  P_2(2)=\dfrac{2!}{2!(2-2)!2^2}=\dfrac{2}{2\times 0!\times4}=\dfrac{1}{4},    P_2(1)=\dfrac{2!}{1!(2-1)!2^2}=\dfrac{2}{1!\times 0!\times 4}=\dfrac{1}{2},

and

P_2(0)=\dfrac{2!}{0!(2-0)!2^2}=\dfrac{1}{4}.

You can see these results by actually enumerating the outcomes: (H,H), (H,T), (T,H), (T,T). So, there is only one possibility of getting either two heads or two tails, while there are two possibilities for getting one head. These outcomes lead to the probabilities above. Try the formulas for three coins and verify the probabilities for the 8 outcomes: (H,H,H), (H,H,T), (H,T,H), (T,H,H), (T,T,H), (T,H,T), (H,T,T), (T,T,T).

The probability of getting 6 heads in tossing 10 coins is

  P_{10}(6)=\dfrac{10!}{6!(10-6)!2^{10}}=\dfrac{10!}{6!4!2^{10}}=\dfrac{10\cdot 9\cdot 8\cdot 7}{4\cdot 3\cdot 2\cdot 1\times 1024}=0.20508,

and the probability of getting 6000 heads in tossing 10000 coins is

  P_{10000}(6000)=\dfrac{10000!}{6000!(10000-6000)!2^{10000}}=\dfrac{10000!}{6000!4000!2^{10000}}.

Most calculators cannot find the answer to this probability, because of the large factorials. However, there is a formula which approximates the natural logarithm of P_n(m) very accurately when both n and m are large, and all scientific calculators are capable of finding the result of that formula. Here is the formula:

  \ln[P_n(m)]=0.5\ln\left(\dfrac{n}{2\pi m(n-m)}\right)+m\ln\left(\dfrac{n}{m}-1\right)-n\ln\left(2-\dfrac{2m}{n}\right).

Knowing the logarithm, you can find the probability itself: P_n(m)\approx e^{\ln[P_n(m)]}. You can check the formula against the exact result for not-so-large values such as (n=20,m=12), (n=30,m=18), (n=50,m=30), and (n=100,m=60), and note that as n and m get larger and larger, the approximation becomes better and better. For (n=10000,m=6000), you get

  \ln[P_{10000}(6000)]=0.5\ln\left(\dfrac{10000}{2\pi 6000(4000)}\right)+6000\ln\left(\dfrac{10}{6}-1\right)-10000\ln\left(2-\dfrac{12}{10}\right)

or
  \ln[P_{10000}(6000)]=0.5\ln\left(\dfrac{1}{4800\pi}\right)+6000\ln\left(\dfrac{2}{3}\right)-10000\ln\left(0.8\right)=-206.166

and

  P_{10000}(6000)=e^{-206.166}=2.9\times10^{-90}.

This is approximately 0.000…0003 with 89 zeros between the decimal point and 3. You should multiply this by 100 to get the percentage. That gets rid of two zeros.

2 thoughts on “Coin Probabilities”

Leave a Reply

Your email address will not be published. Required fields are marked *