Library / Probability distributions / PRD-49
Probability distributions
Batch variation: expected successes
Expected number of successes per batch: the number of trials times the mean success probability a/(a + b).
- Ref
- PRD-49
- Rev
- v1
- Field
- Probability distributions
- Result
- E[X]
The expected number of successes per batch is n a/(a + b): the number of trials times the mean success probability. It is the same as for a plain binomial with p = a/(a + b); the batch variation shows up only in the variance.
Expected number of successes per batch: the number of trials times the mean success probability a/(a + b).
Calculator
- Mean success probability, a/(a + b)0.4
- Expected failures per batch6
- Total shape, a + b5
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.
- A batch of 10 trials has an average of 4 successes at a mean probability of 0.4.
- Raising a while holding b fixed lifts the mean probability and the expected count together.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing () | Local step | Change in result |
|---|---|---|---|---|---|---|
| n Trials per batch n | 1 to 40 | 0.4 | 16 | 15.6 | +1 | +10 % |
| b Shape b | 0.2 to 10 | 1.667 | 9.091 | 7.424 | +10% | −5.66 % |
| a Shape a | 0.2 to 10 | 0.625 | 7.692 | 7.067 | +10% | +5.77 % |
Sweep of Trials per batch n
| Trials per batch n | Expected successes |
|---|---|
| 1 | 0.4 |
| 5.875 | 2.35 |
| 10.75 | 4.3 |
| 15.63 | 6.25 |
| 20.5 | 8.2 |
| 25.38 | 10.15 |
| 30.25 | 12.1 |
| 35.13 | 14.05 |
| 40 | 16 |
Sweep one variable
Variables and how each one contributes
Expected successes
What the equation gives you. Everything else feeds it.
Trials per batch n
The number of trials in a batch (a whole number, at least 1). More trials per batch raise the mean count and the variance. Raising it by 1 (to 11) moves the result by +10 %, from 4 to 4.4.
Shape a
The first shape of the beta distribution of batch probabilities (a plain number). Raises the average success probability and narrows its spread. Raising it by 10 % (to 2.2) moves the result by +5.77 %, from 4 to 4.231.
Shape b
The second shape of the beta distribution of batch probabilities (a plain number). Lowers the average success probability and narrows its spread. Raising it by 10 % (to 3.3) moves the result by −5.66 %, from 4 to 3.774.
Worked example with the values above
- Mean success probability: a/(a + b) = 2 / 5 = 0.4.
- Multiply by n = 10.
- E[X] = 4.
Assumptions and limits
- Within a batch the trials are independent with a common probability p; across batches p follows a beta distribution with shapes a, b > 0.
- n and x are whole numbers, and 0 ≤ x ≤ n.
Common mistakes
- Using a plain binomial when batches differ in quality: it understates the variance and the chance of extreme batches.
- Treating a and b as probabilities: they are shape parameters, and a/(a + b) is the mean probability.
- Using the formula for x outside 0 to n: the probability is zero there.
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
- Defect counts in batches of parts when batch quality varies.
- Test pass counts across lots, and any count with more spread than a binomial.
Maths you need
- Binomial distribution: successes in independent trials
- Beta distribution: a model for a probability that varies