5

We have a coin with probability of head is p and probability for tail is (1-p). We toss the coin N times, what is the probability that the number of tosses that show head is even?

What I've tried is to sum over all even k's (k= 0,2,4,...) and to sum up the probability that the number of heads is k. Is there a way to elinimate the sum and to give a closed formula?

Shmoopy
  • 325

1 Answers1

5

Let $a_N$ be the probability that $N$ Bernoulli trials result in an even number of successes. This occurs if an initial failure is followed by an even number of successes, or an initial success is followed by an odd number of successes. Therefore $a_0=1$ and for $N\geq 1$ $$a_N=q a_{N-1}+p(1-a_{N-1}).$$ Multiplying by $s^N$ and adding over $N$ we see that the generating function satisfies $$H(s)=1+qsH(s)+ps(1-s)^{-1}-psH(s)$$ or $$2H(s)=[1-s]^{-1}+[1-(q-p)s]^{-1}.$$ Expanding the right hand side using geometric series we find that the coefficients satisfy $$a_N={1\over 2}+{(q-p)^N\over 2}.$$

Reference: Chapter XI of An Introduction to Probability Theory and Its Applications (Volume 1) (3rd edition) by William Feller.

  • Hoped it would be simpler, but thanks! – Shmoopy Nov 03 '13 at 19:53
  • @Shmoopy Well the derivation is not that easy, but the final answer is quite nice. –  Nov 03 '13 at 19:54
  • A small note, $q$ is defined as $q=1-p$ (i.e. the probability of failure) – deps_stats Oct 25 '17 at 23:37
  • Is it possible to have a more specific reference in the book? I can't find where it talks about this. – Dio Apr 08 '19 at 14:39
  • What boggles me about it is how would you define the sample space in this problem to get the complement probability that is used in the solution. If $A_n$ is the event of having an even number of heads after n tosses, it is well defined in a sample space of n tosses. But then what is the event $A_{n-1}^c$ in the same sample space? It should include the event of odd number of heads after $n-1$ tosses, but also even number after n tosses, since it's in the complement. How would you define the sample space for both $A_n$ and $A_{n-1}$? – Paul Oct 14 '19 at 13:31
  • Somehow I don't really see how to get to the equation for 2H(s). Any hints? – Rene Recktenwald Dec 01 '20 at 11:42
  • 1
    nvm I got it after a coffee break. For other people wondering: You get there by first getting all the H(s) on one side, and then multiplying by two. Then write 2=1+1 and write (1-(q-p)s) =(1-s+2ps). – Rene Recktenwald Dec 01 '20 at 12:05