Skip to contents

Draws n from a population of N of which K = round(pN) are successes; as N grows at fixed p the pmf tends to Binomial(n, p).

Usage

HyperLim(k, n, p, N)

Arguments

k

successes drawn, >= 0.

n

draws, >= 0.

p

success fraction in the population, in [0, 1].

N

population size, >= n.

Value

list(hypergeometric, binomial, abs_error).

References

Morin, D. J. (2016). Probability: For the Enthusiastic Beginner. Createspace. Eqs (4.73), (4.75).

Examples

HyperLim(2, 5, 0.25, 1000)$abs_error
#> [1] 0.0005285479