Your Equation

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

Solve for
140
0.210
0.210
  • 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.

Expected successes () current value 4
nTrials per batch nKey driver
0.416
bShape b
1.679.09
aShape a
0.6257.69
  • 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

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
n Trials per batch n1 to 40 0.41615.6+1 +10 %
b Shape b0.2 to 10 1.6679.0917.424+10%−5.66 %
a Shape a0.2 to 10 0.6257.6927.067+10%+5.77 %

Sweep of Trials per batch n

Trials per batch nExpected successes
10.4
5.8752.35
10.754.3
15.636.25
20.58.2
25.3810.15
30.2512.1
35.1314.05
4016

Sweep one variable

Expected successes ()Hover, touch, or use the arrow keys on the chart
051015 5152535 Trials per batch n now 4

Variables and how each one contributes

E[X]

Expected successes

Result ·

What the equation gives you. Everything else feeds it.

n

Trials per batch n

· typical 1 to 40

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.

a

Shape a

· typical 0.2 to 10

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.

b

Shape b

· typical 0.2 to 10

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

  1. Mean success probability: a/(a + b) = 2 / 5 = 0.4.
  2. Multiply by n = 10.
  3. 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

Related formulas

Practise this formula