Parity of Heads
You flip \(10\) independent coins: \(4\) coins land heads with probability \(\tfrac{9}{10}\) and \(6\) coins land heads with probability \(\tfrac{1}{10}\). What is the probability that the total number of heads is odd?
Answer
Let \(N\) be the total number of heads and define
\[
(-1)^N =
\begin{cases}
1, & N \text{ even},\\
-1, & N \text{ odd}.
\end{cases}
\]
We have three insights:
- \[ \mathbb{E}[(-1)^N]=\mathbb{P}(N\text{ even})-\mathbb{P}(N\text{ odd}). \]
Write \(N=\sum_{i=1}^{10} I_i\), where \(I_i=\mathbf{1}\{\text{coin }i\text{ is heads}\}\). Then
\[ (-1)^N=\prod_{i=1}^{10}(-1)^{I_i}, \]so by independence,
\[ \mathbb{E}[(-1)^N]=\prod_{i=1}^{10}\mathbb{E}[(-1)^{I_i}]. \]For coin \(i\) with head probability \(p_i\),
\[ \mathbb{E}[(-1)^{I_i}]=(1-p_i)\cdot 1+p_i\cdot(-1)=1-2p_i, \]hence
\[ \mathbb{E}[(-1)^N]=\prod_{i=1}^{10}(1-2p_i). \]- \[ \mathbb{P}(N\text{ even})+\mathbb{P}(N\text{ odd})=1. \]
Combining all three we have,
\[
\mathbb{P}(N\text{ odd})=\frac{1-\mathbb{E}[(-1)^N]}{2}
=\frac{1-\prod_{i=1}^{10}(1-2p_i)}{2}.
\]
Here \(p_i=\tfrac{9}{10}\) for \(4\) coins and \(p_i=\tfrac{1}{10}\) for \(6\) coins, so
\[
\prod_{i=1}^{10}(1-2p_i)
=\left(1-2\cdot \frac{9}{10}\right)^4\left(1-2\cdot \frac{1}{10}\right)^6
=\left(-\frac{4}{5}\right)^4\left(\frac{4}{5}\right)^6
=\left(\frac{4}{5}\right)^{10}.
\]
Therefore,
\[
\boxed{\mathbb{P}(N\text{ odd})=\frac{1-\left(\frac{4}{5}\right)^{10}}{2}\approx 0.446.}
\]