The geometric distribution is a discrete random variable distribution function. Describes a random experiment with two possible outcomes (success - failure) (Bernoulli trials) and probability of success p repeated until we have 1 success.
Consider the random variable X is the number of tests.
The probability distribution of the number X of Bernoulli trials needed to get one success is: