Probability of Streaks

You have seen the binomial theorem. If you toss a coin 7 times, what is the chance of seeing all heads? It’s (1/2)7 = 0.0078 – less than a 1% chance! Now, what is the chance of seeing 7 consecutive heads at least once if you toss 200 times?

Let’s run this R code on random sampling and do Monte Carlo simulations to average it over 10,000 instances of 200 coin tosses.

library(stringr)

trial <- 10000

streak <- replicate(trial, {
toss <- sample(c("H", "T"), 200, replace = TRUE, prob = c(0.5,0.5))
toss1 <- paste(toss,collapse=" ")
count <- str_count(toss1, c("H H H H H H H"))

})

mean(streak)

Chance is more than 75%

Ok, what is the chance of seven heads if the probability of heads is increased slightly to 20/38? Almost always. There is a reason for this strange-looking probability of 20/38. That is next.