Poisson-Binomial Distribution
Build success-count probabilities from independent trials with different chances, inspect inclusive events and compare a binomial model with the same mean.
By Riano · Published · Report a correction
Poisson-Binomial Distribution
Different chances, one count
Four independent components need not have the same chance of working. Counting the working components still produces a finite success-count distribution, but an ordinary binomial model can lose information. The Poisson-binomial distribution keeps every individual chance. Its name does not mean that the count follows a Poisson distribution or a continuous-time Poisson process.
From independent indicators to a PMF
For trial indices i = 1, …, n, let Bi be independent Bernoulli indicators with known probabilities pi. Each indicator is either 0 or 1. Their sum X = Σi=1n Bi counts successes. For an integer k between 0 and n, its probability mass function is the sum of the probabilities of all binary outcomes having exactly k successes.
G(z) = ∏i=1n[(1 − pi) + piz]
The coefficient of zk in G is P(X = k): choosing a success term contributes one power of z. Summing every coefficient gives G(1) = 1. If all probabilities equal p, the product becomes (1 − p + pz)n, recovering the ordinary binomial distribution.
Build one trial at a time
Let fi(k) be the chance of k successes after the first i trials. The last trial either fails, leaving k successes, or succeeds after k − 1 earlier successes. These disjoint cases give a nonnegative convolution:
fi(k) = (1 − pi)fi−1(k) + pifi−1(k − 1)
fi(k) = 0 when k < 0 or k > i
Computing all rows takes O(n2) arithmetic operations. Keeping only the current row needs O(n) working memory; this explorer also retains the rows for its optional convolution explanation. For At most k, sum counts 0 through k. For At least k, sum counts k through n. Both include k. The explorer adds the selected PMF terms directly instead of subtracting a nearly-one cumulative probability.
A checked four-trial example
Use the original example p = (0.1, 0.3, 0.7, 0.9). Expanding the four linear factors, or enumerating the 16 binary outcome vectors and grouping by count, gives the following rows. These numbers are derived here rather than taken from a source’s worked example.
| Trials included | PMF in count order |
|---|---|
| 0 | [1] |
| 1 | [0.9, 0.1] |
| 2 | [0.63, 0.34, 0.03] |
| 3 | [0.189, 0.543, 0.247, 0.021] |
| 4 | [0.0189, 0.2244, 0.5134, 0.2244, 0.0189] |
- The mean is 0.1 + 0.3 + 0.7 + 0.9 = 2. Independence makes the variance 0.09 + 0.21 + 0.21 + 0.09 = 0.6.
- At least 3 successes includes counts 3 and 4: 0.2244 + 0.0189 = 0.2433.
- The matched average is 2/4 = 0.5. Binomial(4, 0.5) has variance 1 and PMF [0.0625, 0.25, 0.375, 0.25, 0.0625]. Its same-event probability is 0.25 + 0.0625 = 0.3125.
- At most 2 instead has probability 0.7567 in the individual-chance model and 0.6875 in the matched binomial. Matching a mean does not match every event.
What averaging changes
For independent trials, E[X] = Σ pi and Var(X) = Σ pi(1 − pi). When n > 0, define pavg = (Σ pi)/n. The binomial comparison shares the mean, but its variance exceeds the individual-chance variance by a sum of squares:
= Σi=1n(pi − pavg)2 ≥ 0
To derive this, expand both variances as a sum of probabilities minus a sum of squared probabilities. Their equal linear terms cancel. Expanding the sum of squares then uses Σ pi = npavg. The gap is zero exactly when all probabilities agree. In the four-trial example it is 1 − 0.6 = 0.4.
Smaller variance is not a universal tail bound
Take probabilities (0.9, 0.9, 0.05, 0.05). Their mean is 1.9 and variance 0.275, while the matched binomial variance is 0.9975. Yet the probability of at least 2 successes is 0.827575, larger than the matched binomial’s 0.649094921875. This threshold is above the mean. A variance comparison alone does not justify ordering these upper tails, nor does it make the comparison curve a probability bound.
Try unequal and equal chances
Open the Poisson-Binomial Distribution explorer. Predict whether keeping the same mean will preserve the height of the center bar, then use its actual controls:
- Press Reset example. Success probabilities (%) reads
10,30,70,90, Threshold is 3 and Event is At least. Check the selected-event probability 0.2433 and matched result 0.3125. Green bars at counts 3 and 4 belong to this event. - Change Event to At most and Threshold to 2. Green bars move to counts 0, 1 and 2. Read 0.7567 against 0.6875; the underlying PMF and moments stay unchanged.
- Set Success probabilities (%) to
50,50,50,50and Event to Exactly, leaving Threshold at 2. The selected probability is 0.375 in both models. Their curves agree, both variances are 1 and the variance gap is 0. - Enter
0,100,25,75. Exactly 2 has probability 0.625, and counts 0 and 4 have zero mass. Deterministic failures and successes reduce the positive support without changing the count labels 0 through 4. - Uncheck Show matched-mean binomial. Its plotted series and comparison results disappear while the primary model remains. Press Reset example to restore every default control and result.
The expandable PMF construction lists every convolution row. Reordering the chance list leaves the final distribution unchanged because multiplication of the generating factors commutes; intermediate rows can change.
Assumptions, endpoints and visible precision
This finite count model assumes independent outcomes with known, fixed individual chances. Check those assumptions before interpreting its probabilities, and separate the mathematical distribution from the rounded numbers and auto-scaled pixels used to display it.
- Independence: Shared causes can correlate outcomes. This model and the summed variance then need not apply. Sampling without replacement is a different model.
- Known fixed chances: The list specifies individual probabilities, not estimates with uncertainty or probabilities that adapt after earlier outcomes.
- Bounded controls: Up to 12 whole percentages from 0 to 100 are supported. Empty or whitespace-only text is an empty list. Empty comma entries, nonfinite tokens and invalid ranges are errors; raw text is retained and stale outputs are hidden. Threshold accepts integers −1 through 13 independently of list length.
- Empty and deterministic cases: An empty sum is zero with probability one; its average chance is undefined, not zero. A probability of 100 percent contributes one certain success and zero percent contributes none. All-counts labels remain 0 through n, even where the probability is zero.
- Queries outside support: Exactly −1 and At most −1 are impossible; At least −1 is certain. Beyond n, Exactly and At least are impossible while At most is certain.
- Numerical meaning: “Exact model” means a direct finite convolution instead of an approximation or random sample. JavaScript floating-point arithmetic still rounds. The displayed total mass rounds to 1; tiny positive outputs use scientific notation. Twelve 1-percent chances give probability 10−24 for exactly 12 successes.
- Plot scaling: The vertical probability axis starts at zero and automatically scales to the plotted PMFs. Read its labeled maximum when comparing different lists or toggling the comparison. A taller-looking bar across rescaled plots need not mean a larger probability. The connecting comparison line only guides the eye between integer counts.
References and related models
- Yili Hong, On Computing the Distribution Function for the Sum of Independent and Non-identical Random Indicators, April 5, 2011 draft — Section 2.1 defines the model and equal-probability special case; Section 2.5, equation 9 gives the nonnegative recurrence and its initial condition; equation 11 gives the moments. The CDF is P(X ≤ k), as its formula states.
- SciPy: poisson_binom — official finite PMF and individual-probability-array documentation. The worked inputs and variance-gap/crossing calculations above are independently derived examples.
Chernoff Bounds studies an upper guarantee for a common-probability binomial model. Multinomial Distribution counts fixed categories across repeated trials. Hypergeometric Distribution models finite sampling without replacement. These related explorers answer different probability questions.
Experience it interactively
Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Poisson-Binomial Distribution module.
Try Poisson-Binomial Distribution on Riano →