size: The Poisson binomial distribution has size times the vector of probabilities prob.
prob: Vector with the probabilities of success on each trial.
log, log.p: Logical. If TRUE, probabilities p are given as log(p).
lower.tail: Logical. If TRUE (default), probabilities are P(X≤x), otherwise, P(X>x).
p: Vector of probabilities.
n: Number of observations.
Returns
dpoisbinom gives the density, ppoisbinom gives the distribution function, qpoisbinom gives the quantile function and rpoisbinom generates random deviates.
The length of the result is determined by x, q, p
or n.
Details
The Poisson binomial distribution with size = 1 and prob=(p1,p2,…,pn) has density
p(x)=A∈Fx∑i∈A∏pij∈Ac∏(1−pj)
for x=0,1,…,n; where Fx is the set of all subsets of x integers that can be selected from {1,2,…,n}.
p(x) is computed using Hong (2013) algorithm, see the reference below.
The quantile is defined as the smallest value x such that F(x)≥p, where F is the cumulative distribution function.
References
Hong Y (2013). “On Computing the Distribution Function for the Poisson Binomial Distribution.” Computational Statistics & Data Analysis, 59 (1), 41-51. tools:::Rd_expr_doi("10.1016/j.csda.2012.10.006") .