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:22PM (#10535158)
Flip 5 coins and stop when each turns up tails, record the number of trials until the last coin is tails (just use # trials for the last coin...). Repeat this 100 times. Does the probability of ending on a given trial keep increasing with trial#? No, it will peak depending on the number of coins and probability of tails for each coin (here always close to 0.5).

This is the same as accumulating n number of modifications in a cell until it grows into and gets detected as a tumor. Instead of accumulating "tails" you are accumulating mutations or whatever it turns out to be.

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)