PRACTICAL CALCULATIONS

First-success trial quantile calculator

Supply a constant success probability per independent trial and a target cumulative probability. The result counts trials including the successful trial.

Result

Smallest trial count
4
Cumulative probability
0.9375
Previous cumulative probability
0.875

Use the cumulative event

With p equal to 0.5, four trials give a 0.9375 chance of at least one success. Three trials give 0.875, so four is the smallest count reaching 0.9. The model assumes independent trials with the same probability.

Endpoints and numerical limits

A per-trial probability of one needs one trial. A target of one with a per-trial probability below one has no finite solution. Other inputs must be greater than zero and at most one, with p at least 10^-12. The numeric calculation uses standard floating-point logarithms, requires values distinguishable from one at about 15 significant digits, and limits the result to one billion trials. Very close thresholds can be sensitive to floating-point rounding.

Work through the reasoning

Checking a first-success median through adjacent trial counts