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?

  • $\begingroup$ certainly this will be of help $\endgroup$ – Tyler Nov 3 '13 at 19:45
  • 3
    $\begingroup$ Hint: $\displaystyle (x+y)^n + (x-y)^n = 2\sum_{k=0}^{n/2} \binom{n}{2k}x^{n-2k}y^{2k}$ $\endgroup$ – Dilip Sarwate Nov 3 '13 at 19:48
  • $\begingroup$ @DilipSarwate Thanks. Where can I find this formula? I didn't see it at the wiki article on the Binomial theorem $\endgroup$ – Shmoopy Nov 3 '13 at 19:53
  • $\begingroup$ Write out the right sides of the following two equations using the binomial theorem: $$\begin{align}(x+y)^n &= x^n + nx^{n-1}y + \cdots \\(x-y)^n &= x^n - nx^{n-1}y + \cdots \end{align}$$ and see if something develops when you add the equations. $\endgroup$ – Dilip Sarwate Nov 3 '13 at 19:57
  • 1
    $\begingroup$ Possible duplicate of If nine coins are tossed, what is the probability that the number of heads is even? $\endgroup$ – Yanior Weg Jun 27 at 20:12

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.

  • $\begingroup$ Hoped it would be simpler, but thanks! $\endgroup$ – Shmoopy Nov 3 '13 at 19:53
  • $\begingroup$ @Shmoopy Well the derivation is not that easy, but the final answer is quite nice. $\endgroup$ – user940 Nov 3 '13 at 19:54
  • $\begingroup$ A small note, $q$ is defined as $q=1-p$ (i.e. the probability of failure) $\endgroup$ – deps_stats Oct 25 '17 at 23:37
  • $\begingroup$ Is it possible to have a more specific reference in the book? I can't find where it talks about this. $\endgroup$ – Dio Apr 8 at 14:39
  • $\begingroup$ 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}$? $\endgroup$ – Paul Oct 14 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.