Find the probability that heads will appear an even number of times in an experiment where:

a) a fair coin is tossed $n$ times;

b) a coin, for which the probability of heads on a single toss is $p(0<p<1)$, is tossed $n$ times.
The probability that heads will appear exactly $k$ times, as is known, is $C_{n}^{k} p^{k} q^{n-k}$, where $q=1-p$ is the probability of tails. Therefore, the event "Heads appeared an even number of times" has a probability of

$P_{2}=C_{n}^{0} p^{0} q^{n}+C_{n}^{2} p^{2} q^{n-2}+C_{n}^{4} p^{4} q^{n-4}+\ldots+C_{n}^{k} p^{k} q^{n-k}$, where $k$ is the largest even number not exceeding $n$.

The complement of this event is the event "Heads appeared an odd number of times." The probability of this is obtained similarly by replacing even indices and powers with odd ones:

$P_{1}=C_{n}^{1} p^{1} q^{n-1}+C_{n}^{3} p^{3} q^{n-3}+C_{n}^{5} p^{5} q^{n-5}+\ldots+C_{n}^{m} p^{m} q^{n-m}$, where $m$ is the largest odd number not exceeding $n$. The difference between these probabilities is: $P_{2}-P_{1}=C_{n}^{0} p^{0} q^{n}-C_{n}^{1} p^{1} q^{n-1}+C_{n}^{2} p^{2} q^{n-2}-C_{n}^{3} p^{3} q^{n-3}+\ldots \pm C_{n}^{n} p^{n} q^{0}=$ $(q-p)^{n}$.

On the other hand, $P_{2}+P_{1}=1$. From the resulting system of equations, we find:

$P_{2}=\frac{1+(q-p)^{n}}{2}=\frac{1+(1-2 p)^{n}}{2}$

In particular, for a symmetric coin $p=0.5$, so $P_{2}=0.5$.

## Answer

a) 0.5; b) $\frac{1+(1-2 p)^{n}}{2}$.

Send a comment