What is going on?
If a single try succeeds with probability p, it fails with probability 1 − p. With independent tries, multiply the failure probability by itself once per try. Subtract that result from 1 to get the chance of at least one success. For chances strictly between 0% and 100%, logs let you solve for the number of tries and round up to the next whole try.
Work through it
- Enter the chance of success on one attempt.
- Enter the overall chance you want to reach.
- Compare the chance at the required number of attempts with the chance one try earlier.
Put numbers to the idea
If each attempt has a 1% success rate, 229 attempts give about a 89.9894% chance of at least one success. The 230th attempt takes it to about 90.0895%, so 230 is the minimum for a 90% target.
A little more clarity
Does a 1% chance per try mean a guaranteed success after 100 tries?
After 100 independent tries at 1% each, the chance of at least one success is about 63.40%. Some runs take many more tries.
Can I reach 100%?
One attempt is sufficient if each attempt has a 100% success chance. For any smaller single-attempt chance, no finite number of independent tries guarantees success.
Is this the same as the average time to first success?
The average wait is 1 / p attempts. A chosen threshold answers how many attempts give you a given chance of succeeding at least once. At 1% per attempt, the average wait is 100 tries and the 90% threshold is 230 tries.