How many attempts give at least a chosen success probability ? For a positive-integer geometric distribution with , completion by attempt means , so
The logarithm is negative, which reverses the inequality when dividing. The least integer meeting the target is therefore obtained with the ceiling function:
For our constructed independent retry mechanism with and ,
To verify minimality directly, eight attempts give , whereas nine give . Under the zero-based convention, the same completion event is , with failure to complete given by ; saying would allow ten attempts. A 95% deadline controls a tail probability, while the expected value describes an average.
At success occurs on the first attempt, so ; the logarithm formula is inapplicable. At no finite deadline achieves a positive target. For , no finite deadline guarantees success with probability one because . A retry cap at produces the capped geometric waiting time as the number of attempts actually spent; reaching the cap can mean either success on the last allowed attempt or failure of all attempts.
For a nonnegative integer-valued random variable, the probability generating function is
with always allowed. Its derivative at from below gives the expectation when finite.
The waiting time has the positive-integer geometric distribution . For the capped geometric waiting time, exactly when , while occurs whenever . Thus the terminal mass is , giving
The finite sum is a polynomial; any apparent singularity of the rational expression is removable. This includes , where .
Differentiating the rational form at yields
As a second interpretation, the expectation is the sum of the tail probabilities for . Their finite geometric sum gives the same answer.