2023.02.17 MATH 3600 Random UD strings

220 days ago by calkin

Computing the probability that at least 63% of symbols are U.

def prob(k): m=floor(.63*k) total=0 for l in srange(m,k+1): total+= binomial(k,l) return((total/2^k).n()) 
       
prob(10) 
       
0.376953125000000
0.376953125000000
prob(20) 
       
0.251722335815430
0.251722335815430
prob(30) 
       
0.180797304026783
0.180797304026783
prob(100) 
       
0.00601648786268174
0.00601648786268174
prob(1000) 
       
8.86392490671270e-17
8.86392490671270e-17