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?
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.