Learn R Programming

DPQ (version 0.5-9)

phyperMolenaar: Molenaar's Normal Approximations to the Hypergeometric Distribution

Description

Compute Molenaar's two normal approximations to the (cumulative hypergeometric distribution phyper().

Usage

phyper1molenaar(q, m, n, k)
phyper2molenaar(q, m, n, k)

Value

a numeric vector, with the length the maximum of the lengths of q, m, n, k.

Arguments

q

(vector of) the number of white balls drawn without replacement from an urn which contains both black and white balls.

m

the number of white balls in the urn.

n

the number of black balls in the urn.

k

the number of balls drawn from the urn, hence in \(0,1,\dots,m+n\).

Author

Martin Maechler

Details

Both approximations are from page 261 of Johnson, Kotz & Kemp (1992). phyper1molenaar is formula \((6.91)\), and phyper2molenaar is formula \((6.92)\).

References

Johnson, Kotz & Kemp (1992): p.261

See Also

Examples

Run this code
 ## TODO -- maybe see  ../tests/hyper-dist-ex.R

Run the code above in your browser using DataLab