2 ms·
Not sure why this was downvoted... It is easy to prove to yourself. Here is some R: #p=Prob(tails), n=# Coins, q=Prob(heads), Npop=# times to repeat p=.5; n=5
by nonbel 11y ago
Not sure why this was downvoted... It is easy to prove to yourself. Here is some R:
#p=Prob(tails), n=# Coins, q=Prob(heads), Npop=# times to repeat
p=.5; n=5; q=1-p; Npop=1000
#Flip one Coin 100x and find first tails (probability of getting one mutation)
OneCoin=function() which(sample(0:1,100, prob=c(q,p), replace=T)==1)[1]
#Flip n coins and find last one to turn up tails (probability of accumulating n mutations)
OneSet=function() max(replicate(n,OneCoin()))
#Repeat Npop times, like different people in a population
res=replicate(Npop,OneSet())
hist(res, breaks=Npop/20)