[Math] Flip a coin 6 times. 4 heads are guaranteed, what is the probability of 4 consecutive heads

probability

No idea how to solve this one…
Flip a coin 6 times….
Events:

A = “the coin comes up heads at least four times”

B = “there are at least four consecutive heads”.

What is Pr(B|A)? Meaning what is the probability of there being 4 consecutive heads given that the coin comes up heads at least 4 times…

I have found the Pr(A) is 34.38% and Pr(B) is 12.5%

Best Answer

Let us assume that you computed your probabilities of $\Pr[A]$ and $\Pr[B]$ correctly. Then, by Bayes theorem, $$\Pr[B \mid A] = \frac{\Pr[A \mid B]\Pr[B]}{\Pr[A]}.$$ But $$\Pr[A \mid B] = 1,$$ because $B$ is a subset of $A$: if $B$ occurred, then $A$ is also guaranteed to have occurred. So the desired probability is $$\Pr[B \mid A] = \frac{\Pr[B]}{\Pr[A]}.$$

That said, you need to check that you did in fact compute those probabilities correctly. For $A$, the ideal choice is to use the binomial distribution: $$\begin{align*} \Pr[A] &= \sum_{k=4}^6 \binom{6}{k} p^k (1-p)^{6-k} \\ &= 15p^4 (1-p)^2 + 6 p^5 (1-p) + p^6, \end{align*}$$ where $p$ is the individual probability of obtaining heads on a single coin flip. $\Pr[B]$ is calculated by direct enumeration: write out all the outcomes for which there are at least four consecutive heads: $$\begin{align*} & (H,H,H,H,T,T) \\ & (H,H,H,H,T,H) \\ & (T,H,H,H,H,T) \\ & (H,T,H,H,H,H) \\ &(T,T,H,H,H,H) \\ &(H,H,H,H,H,T) \\ & (T,H,H,H,H,H) \\ & (H,H,H,H,H,H). \end{align*}$$ So the total probability is $$3p^4 (1-p)^2 + 4p^5 (1-p) + p^6,$$ again for the general case where the probability of heads is $p$. So the desired conditional probability is (after some simplification) $$\Pr[B \mid A] = \frac{3-2p}{15-24p+10p^2}.$$

Related Question