Library / Probability distributions / PRD-47
Probability distributions
Failures before a target: variance
Variance of the failure count before the rth success.
- Ref
- PRD-47
- Rev
- v1
- Field
- Probability distributions
- Result
- Var[X]
The variance r(1 − p)/p² of the failure count exceeds its mean r(1 − p)/p by a factor of 1/p, so the counts are always more spread out than a Poisson count of the same average. Use it to see how much the failure count varies between repeated sequences.
Variance of the failure count before the rth success. It always exceeds the mean, so the counts are more spread out than a Poisson count of the same average.
Calculator
- Standard deviation3.354
- Mean failures, r(1 − p)/p4.5
- Variance-to-mean ratio, 1/p2.5
What drives the result
Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.
- The standard deviation is 3.35 failures around a mean of 4.5: counts vary widely between sequences.
- The variance is 2.5 times the mean, so a Poisson model would badly understate the spread.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing () | Local step | Change in result |
|---|---|---|---|---|---|---|
| p Success probability p | 0.05 to 0.95 | 0.1662 | 1,140 | 1,140 | +10% | −22.9 % |
| r Target number of successes r | 1 to 10 | 3.75 | 37.5 | 33.75 | +1 | +33.3 % |
Sweep of Success probability p
| Success probability p | Variance of the failures |
|---|---|
| 0.05 | 1,140 |
| 0.1625 | 95.15 |
| 0.275 | 28.76 |
| 0.3875 | 12.24 |
| 0.5 | 6 |
| 0.6125 | 3.099 |
| 0.725 | 1.57 |
| 0.8375 | 0.695 |
| 0.95 | 0.1662 |
Sweep one variable
Variables and how each one contributes
Variance of the failures
What the equation gives you. Everything else feeds it.
Target number of successes r
The target number of successes (a whole number, at least 1). A larger target needs more failures along the way on average. Raising it by 1 (to 4) moves the result by +33.3 %, from 11.25 to 15.
Success probability p
The probability of success on each trial (0 to 1). Trials are independent. A higher success probability cuts the number of failures sharply. Raising it by 0.05 (to 0.45) moves the result by −27.6 %, from 11.25 to 8.148.
Worked example with the values above
- Numerator: r(1 − p) = 3 × 0.6 = 1.8.
- Denominator: p² = 0.16.
- Var = 11.25.
Assumptions and limits
- Independent trials with the same success probability p, run until the rth success.
- r is a whole number and 0 < p < 1.
Common mistakes
- Forgetting that x counts failures only: the total number of trials is x + r.
- Assuming a constant p when it drifts, for example when attempts improve with practice.
- Using a Poisson model for counts that are more spread out than their mean.
Statistics and uncertainty
A mean, variance or percentile is calculated from fitted parameters, and the uncertainty in those parameters passes straight through. A distribution fitted to a small sample can have parameters that are far from the truth, especially in the tails and for the variance, so quote the result together with the sample size it rests on.
Where it is used
- Counting failed attempts before a target number of passes in testing.
- Overdispersed count data, where the variance exceeds the mean.
Maths you need
- Combinations: ways of choosing items, C(n, k)
- Independent trials: each outcome unaffected by the others