1

This is an extension of a question in the textbook, "Mathematical Statistics and Data Analysis", in which Rice asks for the probability of a sequence of three heads when a fair coin is flipped five times.

When doing the question by Rice, I was able to do a quick list in my head of the combinations and come to an answer but what if the numbers are too large? Is there a systematic approach to questions like these? Could you also go over the intuition behind it?

  • Well, I'd implement it recursively. If your string has length $n$, then either the first $30$ are $H$ or it begins with a string of the form $H^aT$ for $0≤a<30$. Cutting off that piece gives you a shorter string, hence the recursion. – lulu Sep 17 '18 at 17:50
  • For the probability that a sequence of $n$ coin flips will contain a sequence of $m$ heads in a row, see https://math.stackexchange.com/questions/59738/probability-for-the-length-of-the-longest-run-in-n-bernoulli-trials. The formula there even works for unfair coins. – Mike Earnest Sep 17 '18 at 17:53

1 Answers1

0

This is the sum of the probabilities of getting the $30$ consecutive heads from coin toss $1 - 30$, plus $2 - 31$ etc......... up to $21 - 50$. Where $2^n$ is the number of ways the outcome prior to the $30$ consecutive run can be configured.

$P = 0.5^{30} + 0.5^{31} + 2^1\cdot 0.5^{32} + 2^2\cdot 0.5^{33} +.............. + 2^{19}\cdot0.5^{50}$

$P = 0.5^{30}(1 + 0.5 + 2\cdot 0.5^2 + 2^2\cdot 0.5^3 + ......+ 2^{19}\cdot 0.5^{20})$

$P = 0.5^{30}(1 + 0.5 + 0.5 + 0.5........... 0.5)$

$P = 0.5^{30}(11)$

$P = 1.02445\cdot 10^{-8}$

I should add, this probability is just to get the $30$ consecutive heads at which point there are no more coin tosses.

Phil H
  • 5,579