Thread:がか/@comment-749631-20151011171238/@comment-26154973-20151011174146

For expected trials https://en.wikipedia.org/wiki/Binomial_distribution, if event A has probability p and we have n trials, then the probability of 1 or more A occurring is q = 1 - (1 - p) ^ n, solving this gives n = log(1 - q, base = 1 - p), p is estimated from the proportion, q is some "good enough" rate like 60% or 80%. E.g for 299 / 24689, log(1 - 0.6, base = 1 - 299 / 24689) ~ 75 trials for 60% (and 1 - (1 - 299 / 24689) ^ 75 ~ 60%).

For error https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Normal_approximation_interval (can also use prop.test from R, though it doesn't really matter here), 1.96 * sqrt((299 / 24689) * (1 - 299 / 24689) / 24689) ~ 0.0014 = 0.14%.