pb {backbone} | R Documentation |
pb
computes the poisson binomial distribution function using the refined normal approximation.
pb(k, p, lowertail = TRUE)
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 |
The Refined Normal Approximation (RNA) offers a close approximation when length(p)
is
large (Hong, 2013).
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.
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
pb(50,runif(100))