Your Equation

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

Solve for
110
0.050.95
  • 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.

Variance of the failures () current value 11.25
pSuccess probability pKey driver
0.1661,140
rTarget number of successes r
3.7537.5
  • 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

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
p Success probability p0.05 to 0.95 0.16621,1401,140+10%−22.9 %
r Target number of successes r1 to 10 3.7537.533.75+1 +33.3 %

Sweep of Success probability p

Success probability pVariance of the failures
0.051,140
0.162595.15
0.27528.76
0.387512.24
0.56
0.61253.099
0.7251.57
0.83750.695
0.950.1662

Sweep one variable

Variance of the failures ()Hover, touch, or use the arrow keys on the chart
020040060080010001200 0.10.30.50.70.9 Success probability p now 11.25

Variables and how each one contributes

Var[X]

Variance of the failures

Result ·

What the equation gives you. Everything else feeds it.

r

Target number of successes r

· typical 1 to 10

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.

p

Success probability p

· typical 0.05 to 0.95

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

  1. Numerator: r(1 − p) = 3 × 0.6 = 1.8.
  2. Denominator: p² = 0.16.
  3. 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

Related formulas

Practise this formula