Poisson-Binomial {RecordTest}R Documentation

The Poisson Binomial Distribution

Description

Density, distribution function, quantile function and random generation for the Poisson binomial distribution with parameters size and prob.

This is conventionally interpreted as the number of successes in size * length(prob) trials with success probabilities prob.

Usage

dpoisbinom(x, size = 1, prob, log = FALSE)

ppoisbinom(q, size = 1, prob, lower.tail = TRUE, log.p = FALSE)

qpoisbinom(p, size = 1, prob, lower.tail = TRUE, log.p = FALSE)

rpoisbinom(n, size = 1, prob)

Arguments

x, q

Vector of quantiles.

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 pp are given as log(p)\log(p).

lower.tail

Logical. If TRUE (default), probabilities are P(Xx)P(X \le x), otherwise, P(X>x)P(X > x).

p

Vector of probabilities.

n

Number of observations.

Details

The Poisson binomial distribution with size = 1 and prob =(p1,p2,,pn)= (p_1,p_2,\ldots,p_n) has density

p(x)=AFxiApijAc(1pj)p(x) = \sum_{A \in F_x} \prod_{i \in A} p_i \prod_{j \in A^c} (1-p_j)

for x=0,1,,nx=0,1,\ldots,n; where FxF_x is the set of all subsets of xx integers that can be selected from {1,2,,n}\{1,2,\ldots,n\}.

p(x)p(x) is computed using Hong (2013) algorithm, see the reference below.

The quantile is defined as the smallest value xx such that F(x)pF(x) \ge p, where FF is the cumulative distribution function.

Value

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.

Author(s)

Jorge Castillo-Mateo

References

Hong Y (2013). “On Computing the Distribution Function for the Poisson Binomial Distribution.” Computational Statistics & Data Analysis, 59(1), 41-51. doi:10.1016/j.csda.2012.10.006.


[Package RecordTest version 2.2.0 Index]