If you repeat an event with multiple repetition-independent outcomes, of which your desired outcome has a probability of X, the probability of that happening after one try is X, but the probability of it happening after N tries is \(1 - (1 - X)^N\). Therefore, if you know X, and you wish to know the average number of repetitions to reach a given probability of X, you can calculate the required N by rearranging and arriving at \(N = \frac{ln(-Y + 1)}{ln(1 - X)}\). So, for example, if you wish to have a 50% chance of obtaining an outcome X, whose probability is known to be 10% each time you do something, you would need to repeat yourself an average of 6.579 times. If you wish to be almost-certain (i.e., 99% sure an event will happen), you would need to repeat yourself 43.709 times.

NumberProb <- function(PExpected, PEvent, rnd = 3){
  Number = log(1 - PExpected)/log(1 - PEvent)
  cat(paste0("An event must be repeated an average of ", round(Number, rnd), " times if the probability of an outcome of that event is ", PEvent * 100, "% and you want a ", PExpected * 100, "% probability of that outcome. \n"))}

NumberProb(0.5, 0.1)
## An event must be repeated an average of 6.579 times if the probability of an outcome of that event is 10% and you want a 50% probability of that outcome.
NumberProb(0.99, 0.1)
## An event must be repeated an average of 43.709 times if the probability of an outcome of that event is 10% and you want a 99% probability of that outcome.
NumberProb(0.2, 0.0675)
## An event must be repeated an average of 3.193 times if the probability of an outcome of that event is 6.75% and you want a 20% probability of that outcome.
NumberProb(0.50, 0.0675)
## An event must be repeated an average of 9.918 times if the probability of an outcome of that event is 6.75% and you want a 50% probability of that outcome.
ProbOnce <- function(PEvent, Number, rnd = 3){
  PExpected = 1 - (1 - PEvent)^Number
  cat(paste0("If you repeat something where your desired outcome has a probability of ", PEvent * 100, "% a total of ", Number, " times, your odds of it happening at least once are ", round(PExpected, rnd) * 100, "%. \n"))}

ProbOnce(0.1, 6.579)
## If you repeat something where your desired outcome has a probability of 10% a total of 6.579 times, your odds of it happening at least once are 50%.
ProbOnce(0.1, 43.709)
## If you repeat something where your desired outcome has a probability of 10% a total of 43.709 times, your odds of it happening at least once are 99%.
ProbOnce(0.0675, 3.193)
## If you repeat something where your desired outcome has a probability of 6.75% a total of 3.193 times, your odds of it happening at least once are 20%.
ProbOnce(0.0675, 9.918)
## If you repeat something where your desired outcome has a probability of 6.75% a total of 9.918 times, your odds of it happening at least once are 50%.