If nine coins are tossed, what is the probability that the number of heads is even?

25.6k Views Asked by At

If nine coins are tossed, what is the probability that the number of heads is even?

So there can either be 0 heads, 2 heads, 4 heads, 6 heads, or 8 heads.

We have $n = 9$ trials, find the probability of each $k$ for $k = 0, 2, 4, 6, 8$

$n = 9, k = 0$

$$\binom{9}{0}\bigg(\frac{1}{2}\bigg)^0\bigg(\frac{1}{2}\bigg)^{9}$$

$n = 9, k = 2$

$$\binom{9}{2}\bigg(\frac{1}{2}\bigg)^2\bigg(\frac{1}{2}\bigg)^{7}$$

$n = 9, k = 4$ $$\binom{9}{4}\bigg(\frac{1}{2}\bigg)^4\bigg(\frac{1}{2}\bigg)^{5}$$

$n = 9, k = 6$

$$\binom{9}{6}\bigg(\frac{1}{2}\bigg)^6\bigg(\frac{1}{2}\bigg)^{3}$$

$n = 9, k = 8$

$$\binom{9}{8}\bigg(\frac{1}{2}\bigg)^8\bigg(\frac{1}{2}\bigg)^{1}$$

Add all of these up:

$$=.64$$ so there's a 64% chance of probability?

13

There are 13 best solutions below

18
On

The probability is $\frac{1}{2}$ because the last flip determines it.

8
On

The easiest way to see this : Consider the number of heads we have in the first $8$ coins.

  • If this number is even, we need a tail, we have probability $\frac{1}{2}$
  • If this number is odd, we need a head, we have probability $\frac{1}{2}$

Hence no matter what the $8$ coins delivered, we have probability $\frac{1}{2}$ , which is the answer.

8
On

If there are an even number of heads then there must be an odd number of tails. But heads and tails are symmetrical, so the probability must be $1/2$.

0
On

All the possible sequences of tosses (which are all equally likely) may be divided into the two categories "even number of heads" and "odd number of heads". You can then pair up each sequence in one category with the "flipped" version (flip every coin in the sequence around) in the other category. This shows that there are equally many sequences in each of the two categories. So the probability of landing in a specific one of them must be $\frac12$.

2
On

Your approach is good also, you probably made a mistake in calculations. The number of favorable outcomes is $$\binom{9}{0}+\binom{9}{2}+\binom{9}{4}+\binom{9}{6}+\binom{9}{8}=1+36+126+84+9=256$$ The number of all possible outcomes is $512$ thus the probability to get even number of heads is $0.5$.

7
On

There are two cases here:

  • There's an even number of heads: 0, 2, 4, 6 or 8 heads
  • There's an odd number of heads: 1, 3, 5, 7 or 9 heads

But notice that having an odd number of heads means having an even number of tails (e.g. 5 heads means 4 tails), so the second case is the same as:

  • There's an even number of tails: 0, 2, 4, 6 or 8 tails

Since heads and tails are equally probable, we can, by symmetry, see that these two cases have the same probability. Therefore each must have probability $1/2$.

0
On

The probability generating function of a Binomiall random variable $X\sim \text{Bin}(n, 1/2)$ with probability of success $1/2$ is given by $$ g_{X}(t)=Et^X=\sum_{k=0}^nP(X=k)t^k=\sum_{k=0}^n\binom{n}{k}\frac{t^k}{2^n}=\frac{1}{2^n}(1+t)^n $$ In particular the probability that $X$ is even is given by $$ \sum_{0\leq k\leq n\, k\,{\text{even}}}P(X=k)=\frac{g(1)+g(-1)}{2}=\frac{1+0}{2}=\frac{1}{2}. $$

0
On

If $h$ denotes getting a heads and $p$ denotes getting tails, let's write $\frac{1}{2}h+\frac{1}{2}p$ for the notion of a fair coin: half the time it turns up heads, and half the time tails.

If we expand out the following product while keeping track of multiplication order, $$\left(\frac{1}{2}h+\frac{1}{2}p\right)\left(\frac{1}{2}h+\frac{1}{2}p\right)=\frac{1}{4}hh+\frac{1}{4}hp+\frac{1}{4}ph+\frac{1}{4}pp,$$ we see that the sequences $hh$, $hp$, $ph$, and $pp$ are equally likely. Forgetting about multiplication order, which we want to do because we only care about how many times heads or tails showed up, corresponds to just treating this like a polynomial: $$=\frac{1}{4}h^2+\frac{1}{2}hp+\frac{1}{4}p^2.$$ We can keep multiplying copies of a fair coin together to find the probability that a certain number of heads or tails happened, where the coefficient in front of $h^kp^\ell$ is the probability of $k$ heads and $\ell$ tails.

Nine coins is the expansion $$\left(\frac{1}{2}h+\frac{1}{2}p\right)^9=\sum_{k=0}^9\binom{9}{k}\left(\frac{1}{2}h\right)^k\left(\frac{1}{2}p\right)^{9-k}=\sum_{k=0}^9\frac{1}{2^9}\binom{9}{k}h^kp^{9-k}.$$ So far, all this has done is explain why you were adding up $2^{-9}\binom{9}{k}$ for $k=0,2,4,\dots,8$. Here, now, is a nice trick. If we formally set $h=1$ and $p=1$, then we get $$1=\sum_{k=0}^9\frac{1}{2^9}\binom{9}{k},$$ and if we formally set $h=-1$ and $p=1$, then we get $$0=\sum_{k=0}^9\frac{1}{2^9}\binom{9}{k}(-1)^k.$$ The average of these two equations is $$\frac{1}{2}=\sum_{k=0,k\text{ even}}^9\frac{1}{2^9}\binom{9}{k},$$ since $\frac{1}{2}(1+(-1)^k)$ is $1$ or $0$ depending on whether $k$ is even or odd. Thus the probability of an even number of heads is $\frac{1}{2}$.

Notice that this did not use the fact nine coins were tossed at any point! (Other than the fact that at least one coin was tossed. In the case of tossing no coins, an even number of heads happens with probability $1$. What part of my argument goes wrong for the case of zero coins?)

1
On

There's a way to do it with barely any maths:

It's clear that if there's an odd number of heads, there's an even number of tails and vice versa, so P(even number of heads) + P(even number of tails) = 1.

Formally rename "heads" to "tails". The problem remains unchanged.

So P(even number of heads) = P(even number of tails) = 1/2.

4
On

$$=\frac{\color{red}{\binom{9}{0}}+\color{blue}{\binom{9}{2}}+\color{orange}{\binom{9}{4}}+\color{green}{\binom{9}{6}}+\color{purple}{\binom{9}{8}}}{\color{red}{\binom{9}{0}}+\color{purple}{\binom{9}{1}}+\color{blue}{\binom{9}{2}}+\color{green}{\binom{9}{3}}+\color{orange}{\binom{9}{4}}+\color{orange}{\binom{9}{5}}+\color{green}{\binom{9}{6}}+\color{blue}{\binom{9}{7}}+\color{purple}{\binom{9}{8}}+\color{red}{\binom{9}{9}}}$$

$$=\frac{\color{red}{\binom{9}{0}}+\color{blue}{\binom{9}{2}}+\color{orange}{\binom{9}{4}}+\color{green}{\binom{9}{3}}+\color{purple}{\binom{9}{1}}}{\color{red}{\binom{9}{0}}+\color{purple}{\binom{9}{1}}+\color{blue}{\binom{9}{2}}+\color{green}{\binom{9}{3}}+\color{orange}{\binom{9}{4}}+\color{orange}{\binom{9}{5}}+\color{green}{\binom{9}{6}}+\color{blue}{\binom{9}{7}}+\color{purple}{\binom{9}{8}}+\color{red}{\binom{9}{9}}}$$

$$=\frac{\color{red}{\binom{9}{0}}+\color{purple}{\binom{9}{1}}+\color{blue}{\binom{9}{2}}+\color{green}{\binom{9}{3}}+\color{orange}{\binom{9}{4}}}{\color{red}{\binom{9}{0}}+\color{purple}{\binom{9}{1}}+\color{blue}{\binom{9}{2}}+\color{green}{\binom{9}{3}}+\color{orange}{\binom{9}{4}}+\color{orange}{\binom{9}{5}}+\color{green}{\binom{9}{6}}+\color{blue}{\binom{9}{7}}+\color{purple}{\binom{9}{8}}+\color{red}{\binom{9}{9}}}$$

$$=\frac{\color{red}{\binom{9}{0}}+\color{purple}{\binom{9}{1}}+\color{blue}{\binom{9}{2}}+\color{green}{\binom{9}{3}}+\color{orange}{\binom{9}{4}}}{\color{red}{\binom{9}{0}}+\color{purple}{\binom{9}{1}}+\color{blue}{\binom{9}{2}}+\color{green}{\binom{9}{3}}+\color{orange}{\binom{9}{4}}+\color{orange}{\binom{9}{4}}+\color{green}{\binom{9}{3}}+\color{blue}{\binom{9}{2}}+\color{purple}{\binom{9}{1}}+\color{red}{\binom{9}{0}}}$$

$$=\frac{a}{a+a}$$

$$=\frac{1}{2}$$

0
On

Here's an analytical answer with greater emphasis on reasoning than anything specific to probability which might lend greater insight into the problem.

Consider if there was only one coin. The probability to have an even number of heads is $1\over2$, since there are two possible outcomes and we are only interested in one of them.

Now, let there be $N \gt 1$ coin tosses. The $N^{\text{th}}$ coin toss will either give a heads or tails. If the $N-1$ tosses resulted in an even number of heads the probability of the $N$ coin tosses resulting in an even number of heads is $1\over2$ since the $N^{\text{th}}$ coin toss will add either $0$ or $1$ to the number of heads from the $N-1$ tosses, and we are only concerned with the parity of the count.

The conclusion is the same for the $N-1$ coin tosses resulting in an odd number of heads.

This approach is valid as this reasoning applies to all possible values of $N$ in our given domain.

$\therefore$ The probability of $N$ coin tosses resulting in an even number of heads is $1\over2$, with $N \in \mathbb{N}$.

0
On

Nine coins, so that two events

$\mathscr{E}_1$ = #heads is even and

$\mathscr{E}_2$ = #tails is even

are mutually exclusive (the number of tails is 9 - number of heads, so former is even iff latter odd) and comprise all possibilities, thus $P(\mathscr{E}_1) + P(\mathscr{E}_2) =1$. But if the coins are fair, then the probabilities must be unchanged if we swap the roles of heads and tails. Hence $P(\mathscr{E}_1)= P(\mathscr{E}_2)$ and we immediately see both probabilities must be $\frac{1}{2}$.


Now you are wondering why your approach doesn't work, because it is basically sound. You've simply made a slip.

You're approach is: sum every second term in the 10 member (i.e. an even number of terms) sequence whose $n^{th}$ term is the probability of $n$ heads. So the sum is:

$$S_1=\sum_{k=0}^{N/2} \binom{N}{2\,k}\left(\frac{1}{2}\right)^N$$

with $N$ odd (here equal to 9).

But, by dint of $\binom{N}{2\,k} = \binom{N}{N-2\,k}$, this sum is equal to the sum of all the other terms

$$S_2 =\sum_{k=0}^{N/2} \binom{N}{N-2\,k}\left(\frac{1}{2}\right)^N$$

in the sequence that don't belong to the first sum. So $S_1=S_2$ and clearly $S_1+S_2=1$, because this sum is the sum of probabilities of all possible mutually exclusive outcomes, therefore 1, or, alternatively, call up the binomial theorem and see that $S_1+S_2=\left(\frac{1}{2} + \frac{1}{2}\right)^9=1$

2
On

A useful way to think about this problem, especially for the case of generally unfair coins, is in terms of a recurrence. Let $p$ be the probability that the coin flips heads, and let $q_n$ be the probability, after $n$ flips, that the number of flips is even. So, in particular, $q_0 = 1$: Before the coin has been flipped at all (after $0$ flips, in other words), the probability that the number of heads is even equals $1$.

We can write a recurrence for $q_{n+1}$ in terms of $q_n$ as follows:

  • If the parity (the even-or-oddness of the heads) was even after $n$ flips, which happens with probability $q_n$, then it stays even with probability $1-p$.

  • If the parity was odd after $n$ flips, which happens with probability $1-q_n$, then it turns even with probability $p$.

(We assume, as is typical in these problems, i.i.d. flips.) With these two observations in mind, we get

$$ q_{n+1} = q_n(1-p) + (1-q_n)p $$

which we can rewrite as

$$ q_{n+1} = p + (1-2p)q_n $$

If this recurrence has a limit $q_n \to q$, then we can put

$$ q = p+(1-2p)q $$ $$ 2pq = p $$

from which we get that either $p = 0$ (in which case, clearly, $q_n = 1$ for all $q$—if you only flip tails, then the parity of heads will always be even), or $q = 1/2$; that is, the limiting probability of even parity is $1/2$ (and the same for odd parity, too, obviously). If there is no limit, it will be because $p = 1$, and we continually alternate between even and odd parity. I do not show this, but it is not difficult.

It is also not difficult to show that the recurrence has the solution

$$ q_n = \frac12 + \frac12(1-2p)^n $$

and this lays out why the symmetry arguments work out well for fair coins: $(1-2p)^n = 0$ for all $n > 0$, leaving us with just $q_n = 1/2$.


It may help to see this recurrence in the form of a Markov chain with two states:

enter image description here

Since the transition probabilities from one state to the other are equal ($p = p$), the state probabilities at equilibrium (if such exists) must also be equal, and therefore both equal to $1/2$.