[Math] A coin is tossed $n$ times. What is the probability of getting odd number of heads

probability

A coin is tossed $n$ times. What is the probability of getting odd number of heads?

I started this chapter sometimes ago and faced in front of a tough problem. At first I started considering cases. Case-I : The probability of getting 1 head.Case-II : The probability of getting 3 head and so on. But there are many cases. So how can I solved this . Please help me. Thank you!

Best Answer

Hint. Let $p_n$ be the probability of getting an odd number of heads tossing a coin $n$ times, then $$p_{n+1}=(1-p_1)\cdot p_{n}+ p_1(1-p_{n})$$ where $p_1$ is the probability to obtain a head with one toss. So given $p_1$ (if the coin is fair then $p_1=1/2$), the above linear recursion allows us to evaluate $p_n$ for any positive integer $n$.

P.S. The recursion is explained as follows: at the $(n+1)$th toss we have an odd number of heads if and only if one of these disjoint cases occurs:

i) we have a tail and in the previous $n$ tosses there are an odd number of heads;

ii) we have a head and in the previous $n$ tosses there are an even number of heads.