Learn R Programming

backbone (version 2.1.0)

pb: Poisson binomial distribution function

Description

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

Usage

pb(k, p, lower = TRUE)

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

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.

References

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

Examples

Run this code
pb(50,runif(100))

Run the code above in your browser using DataLab