The Poisson binomial distribution comes up when you consider the number
of successes in independent binomial experiments (coin flips) with
potentially varying success probabilities.
The PoissonBinomial
distribution class in distributions3
is mostly based on the PoissonBinomial package, providing fast
Rcpp implementations of efficient algorithms. Hence, it is
recommended to install the PoissonBinomial package when working
with this distribution. However, as a fallback for when the PoissonBinomial
package is not installed the methods for the PoissonBinomial
distribution employ a normal approximation.
We recommend reading the following documentation on
https://alexpghayes.github.io/distributions3/, where the math
will render with additional detail.
In the following, let \(X\) be a Poisson binomial random variable with
success probabilities \(p_1\) to \(p_n\).
Support: \(\{0, 1, 2, ..., n\}\)
Mean: \(p_1 + \dots + p_n\)
Variance: \(p_1 \cdot (1 - p_1) + \dots + p_1 \cdot (1 - p_1)\)
Probability mass function (p.m.f):
$$
P(X = k) = \sum_A \prod_{i \in A} p_i \prod_{j \in A^C} (1 - p_j)
$$
where the sum is taken over all sets \(A\) with \(k\) elements from
\(\{0, 1, 2, ..., n\}\). \(A^C\) is the complement
of \(A\).
Cumulative distribution function (c.d.f):
$$
P(X \le k) = \sum_{i=0}^{\lfloor k \rfloor} P(X = i)
$$
Moment generating function (m.g.f):
$$
E(e^{tX}) = \prod_{i = 1}^n (1 - p_i + p_i e^t)
$$