Skip to main content

builtin_dhyper

Function builtin_dhyper 

Source
fn builtin_dhyper(
    args: &[RValue],
    named: &[(String, RValue)],
) -> Result<RValue, RError>
Expand description

Hypergeometric density (probability mass) function.

dhyper(x, m, n, k) = choose(m,x) * choose(n,k-x) / choose(m+n,k)

@param x quantile vector (integer values) @param m number of white balls in the urn @param n number of black balls in the urn @param k number of balls drawn from the urn @return numeric vector of probabilities