pb {backbone}R Documentation

Poisson binomial distribution function

Description

pb computes the poisson binomial distribution function using the refined normal approximation.

Usage

pb(k, p, lower = TRUE)

Arguments

k

numeric: values where the pdf should be evaluated

p

numeric: vector of success probabilities

lower

boolean: If FALSE return lower tail, if FALSE return upper tail

Details

The Refined Normal Approximation (RNA) offers a close approximation when length(p) is large (Hong, 2013). This function is a slightly more efficient implementation of ppoibin() from the poibin package.

Value

numeric: probability of observing k or fewer (if lower = TRUE), or more than k (if lower = FALSE), successes when each trial has probability p of success

References

Hong, Y. (2013). On computing the distribution function for the Poisson binomial distribution. Computational Statistics and Data Analysis, 59, 41-51. doi: 10.1016/j.csda.2012.10.006

Examples

pb(50,runif(100))

[Package backbone version 2.1.0 Index]