RE: Candidate 1
For those interested, here’s the math:
A one in N chance event will not occur with probability 1-1/N.
It will not occur after 2 trials with probability (1-1/N)^2.
It will occur at least once after 2 trials with probability 1-(1-1/N)^2
It will occur at least once after k trials with probability 1-(1-1/N)^k.
For an even chance for it to occur at least once, how many trials do we need?
We solve for k in this equation:
1-(1-1/N)^k = 0.5
(1-1/N)^k = 0.5
taking logs of both sides
k = ln 0.5/ln (1-1/N)
dividing by N
k/N = ln 0.5 / ln(1-1/N)^N
(1-1/N)^N tends to e^-1 (since (1+x/N)^N tends to e^x, let x=-1)
so ln(1-1/N)^N tends to −1. The convergence is pretty fast. So is reliable for large N.
so k/N = -ln 0.5 = ln 2 which is about 0.7
so k=0.7N
Example for a one-in-a-million chance event, after 700,000 trials, you would have even chance of seeing at least one occurrence.
In general for a one-in-a-N chance event, there is an even chance that you would see at least one occurrence after 0.7N trials.
And of course, you can choose another probability instead of 0.5 too.
(Since I’m no mathematician, there may be mistakes in there somewhere. Please feel free to suggest corrections.)
That’s a useful number to know, thanks!
You’re welcome!
RE: Candidate 1
For those interested, here’s the math:
A one in N chance event will not occur with probability 1-1/N.
It will not occur after 2 trials with probability (1-1/N)^2.
It will occur at least once after 2 trials with probability 1-(1-1/N)^2
It will occur at least once after k trials with probability 1-(1-1/N)^k.
For an even chance for it to occur at least once, how many trials do we need?
We solve for k in this equation:
1-(1-1/N)^k = 0.5
(1-1/N)^k = 0.5
taking logs of both sides
k = ln 0.5/ln (1-1/N)
dividing by N
k/N = ln 0.5 / ln(1-1/N)^N
(1-1/N)^N tends to e^-1 (since (1+x/N)^N tends to e^x, let x=-1)
so ln(1-1/N)^N tends to −1. The convergence is pretty fast. So is reliable for large N.
so k/N = -ln 0.5 = ln 2 which is about 0.7
so k=0.7N
Example for a one-in-a-million chance event, after 700,000 trials, you would have even chance of seeing at least one occurrence.
In general for a one-in-a-N chance event, there is an even chance that you would see at least one occurrence after 0.7N trials.
And of course, you can choose another probability instead of 0.5 too.
(Since I’m no mathematician, there may be mistakes in there somewhere. Please feel free to suggest corrections.)
That’s a useful number to know, thanks!
You’re welcome!