Free · Distributions and plots calculators 🔔
Geometric Distribution: Failures Before First Success
Find the probability of exactly k failures before the first success, with the mean and spread of the failure count.
- Formula & worked example
- Private in your browser
- No signup
Calculator inputs
Loading calculator…
How to use this calculator
- Enter the known values in the units shown. Results update as you type.
- Where results are editable, change one to solve backwards. Lock a value to hold it fixed.
- Use the worked example to check the method. Reset restores the starting fields.
Private by default
Inputs and results stay in this browser tab. Bookify does not upload or store the values you enter.
Formula and method
For independent trials with success probability 0.5, exactly three failures followed by success has probability 0.0625. The expected failure count is 1 and its variance is 2.
P(K = k) = (1 − p)^k p; E(K) = (1 − p)/p; Var(K) = (1 − p)/p²
Worked example
Enter these known values and leave the other values blank.
- Success probability as a fraction
- 0.5
- Whole failures before first success
- 3
- Probability of exactly this failure count
- 0.0625
- Expected failure count
- 1
- Failure-count variance
- 2
- Failure-count standard deviation
- 1.4142
Assumptions and limitations
- Trials are independent with the same success probability, greater than zero and at most one. Failure count is a nonnegative whole number.
- This convention counts failures, beginning at zero. The total number of trials through success is one greater and has a different mean.
- The mean, variance and standard deviation need not be integers. With certain success p = 1, failure count zero has probability one and positive failure counts have probability zero.
- Inverse failure count must be a whole number. At p = 1, the logarithmic failure-count inverse is undefined; enter the failure count for a forward calculation.
Common questions
Why is the expected count 1 when a fair trial takes 2 trials on average?
The calculator counts failures before the successful trial. Adding the final success gives an expected total of 2 trials.
Can I enter zero probability of success?
No. If success never occurs, a finite waiting count and these finite moments are undefined.
References
Bookify uses the equivalent stable inverse p = 2/(1 + √(1 + 4 variance)), including zero variance and certain success. Bookify removes logarithm roundoff before checking inverse failure counts. Bookify requires a positive success probability, whole nonnegative failures and nonnegative distribution summaries.
Related calculators
Explore distributions and plots calculators 🔔 or browse all statistics calculators.