A pesar de este balance no puede ser hecho fácilmente, pero creo que esta va a ser la fórmula exacta para calcular esta probabilidad. Creo que de 20 éxitos juntos como un solo evento. Ahora hay total 80 + 1 ranura ( estoy pensando en 20 como un solo evento). Ahora los eventos en los que hay al menos un 20 jefes son necesarios para tener 20 consecutivos succesess.
Supongamos que hay x cabezas en total, (x≥20) fuera de estos, estamos considerando la posibilidad de 20 1 gran evento de modo que la probabilidad de tener 20 consecutivos éxitos \binom{81}{x-20+1}p^x(1-p)^{100-x}
So our required probability with p = 0.9 will be
\sum_{x =20}^{100}\binom{81}{x-19}0.9^x\cdot0.1^{100-x}
Although this is a nasty summation but I think this is the exact method to find this probability.
Note: I have written it just for the sake of completeness. For computing, method given by @awkward is better.
Here is some R code for simulating this problem. Running the simulation for 10000 times and setting seed (1236)
we get probability 0.7729
# Generating a single run and counting
# if there are 20 consecutive succeses
consecutiveSuccess <- function(p, count, n) {
trials <- rbinom(n, 1, p)
for (i in 1:(n-count+1)) {
if (sum(trials[i:(i+count-1)]) == count)
return(1)
}
return(0)
}
# simulation starts here
set.seed(1236)
t = 10000
p = 0.9
count = 20
n = 100
sum = 0
for (j in 1:t) {
sum = sum + consecutiveSuccess(p, count, n)
}
prob <- (sum*1.0)/t