News for hackers. Stuff that matters.
Re:Vitamin C kills tumor cells with hard-to-treat mutation i... by nonbel on Monday November 09, 2015 @02:45PM (#10535313)
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)

There are no comments on this comment yet.