2
$\begingroup$

A coin is tossed $m+n$ times. Find the probability of getting atleast $m$ consecutive heads

I already know that the exact same question has already been answered here

But I am trying to solve it using another method.

  1. The first case is when at least $m$ consecutive heads occur before getting a tail. That is $$HHH\cdots HH \_~\_~\_~\_~\cdots\_~\_$$ Number of ways $=2^{n}$
  2. Second case is when Tail comes first and then $m$ consecutive heads. Number of ways $=2^{n-1}$
  3. Third case is:$$\_THHH\cdots HH\_~\_~\_\cdots\_~\_$$ First position can either be $H$ or $T$. Number of ways $=(1/2)^{1}\cdot2^{n-2}$

There will be many cases. Last case is when $m$ consecutive heads come after $n$ trials. Number of ways is $2^{n-1}\cdot1/2^{0}$

Total number of ways $$=2^n+2^{n-1}+1/2^1\cdot2^{n-2}+1/2^2\cdot2^{n-3}+\cdots +2^{n-1}\cdot1/2^0$$ $$=2^n+(n+1)1/2^{n-1}$$

Probability is $$\frac{2^n+(n+1)1/2^{n-1}}{2^{m+n}}=\frac{n+2}{2^{m+1}}$$ This is the required answer By (S.A.M).B-tech-N.I.T

$\endgroup$
1
$\begingroup$

There are $2^{m+n}$ outcomes in total. Now treat the string of $m$ consecutive heads as a single head with $n$ more tosses. So our string of $m$ heads can be in $n+1$ different positions relative to the other $n$ coin tosses. The outcomes of those $n$ tosses do not matter since your question asks for at least a string of $m$ heads. So the probability should be: $(n+1)2^{n}/2^{n+m}$. Is this what you got?

$\endgroup$
  • $\begingroup$ What's the mistake in my approach? $\endgroup$ – Aditya Dev Feb 7 '16 at 0:31
  • $\begingroup$ I think the main mistake in your approach might be that you are forgeting to account for all the possible ways in which the string of m, m+1,m+2...heads can be. Note that for a string of m heads , treating it as a single block we can have it in n+1 different positions. $\endgroup$ – user310648 Feb 7 '16 at 3:33
  • $\begingroup$ Is there any other constraint on m and n? Because I feel, we may count certain cases multiple times with this approach. Say m consecutive heads are marked as H other heads and tails as h and t respectively. so this approach will count ..hH.. and ..Hh.. twice, but these are essentially the same patterns. What am I missing here? $\endgroup$ – bytestorm Aug 24 '18 at 10: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.