rStats.js v1.3.0
    Preparing search index...

    Function qhyper

    • Quantile function of the hypergeometric distribution (number of white balls among k drawn without replacement from an urn of m white and n black balls). Equivalent to R's qhyper(p, m, n, k, lower.tail = TRUE, log.p = FALSE).

      Type Parameters

      Parameters

      • p: T

        Probability (or log probability with logP): a number, number[] or Float64Array. The result has the same shape.

      • m: number

        Number of white balls in the urn.

      • n: number

        Number of black balls in the urn.

      • k: number

        Number of balls drawn.

      • options: TailOptions = {}

        lowerTail and logP (see TailOptions).

      Returns VectorResult<T>

      The quantile(s).

      qhyper(0.5, 10, 7, 8);          // 5
      qhyper([0.05, 0.95], 10, 7, 8); // [3, 6]