Multiple Streaks.math
1r. the attempt on this page is to show the probabilities of a run (streak) of at least X in length happening at least 1 time in N trials.
It is possible to have more than 1 such streak in N trials that is totally separate from each other.
An error will happen in the code result for more streaks possible. example: run=5, n=20,s=4 will return an error (Error in mruns(5, 20, 0.5, 4) :
The number of streaks(s) must be less than or equal to (<=) maxRun below)
n=20;r=5;
quotient=floor(n/(r+1));
remainder=n%%(r+1)#2,2 and 2 = r
if(remainder==r){
s=quotient+1
}else{
s=quotient
}
print(s)
R code below (needs to be updated as probability distribution of exactly X runs is missing)