Skip to contents

P(k) = C(K,k) C(N-K, n-k) / C(N,n); as N grows at fixed p = K/N it approaches the binomial. Mirrors morie.fn ...4e71/4e73/4e75.

Usage

morie_hypergeometric_dist(k, N, K, n)

Arguments

k

successes drawn.

N, K, n

population, successes in population, draws.

Value

list(pmf, binomial_limit, abs_error).

References

Morin (2016), eqs. (4.71), (4.73), (4.75).

Examples

morie_hypergeometric_dist(2, 52, 13, 5)$pmf
#> [1] 0.2742797