pb: Poisson binomial distribution function

View source: R/pb.R

pbR Documentation

Poisson binomial distribution function

Description

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

Usage

pb(k, p, lowertail = TRUE)

Arguments

k

numeric: value where the pdf should be evaluated

p

vector: vector of success probabilities

lowertail

boolean: If TRUE return both upper & lower tail probabilities, if FALSE return only upper tail probability

Details

The Refined Normal Approximation (RNA) offers a close approximation when length(p) is large (Hong, 2013).

Value

vector, length 2: The first value (if lower = TRUE) is the lower tail probability, the probability of observing k or fewer successes when each trial has probability p of success. The second value is the upper tail probability, the probability of observing k or more 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))

backbone documentation built on Feb. 16, 2023, 6:13 p.m.