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

    Function qgeom

    • Quantile function of the geometric distribution (number of failures before the first success). Equivalent to R's qgeom(p, prob, 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.

      • prob: number

        Probability of success on each trial.

      • options: TailOptions = {}

        lowerTail and logP (see TailOptions).

      Returns VectorResult<T>

      The quantile(s).

      qgeom(0.5, 0.3);          // 1
      qgeom([0.1, 0.9], 0.3); // [0, 6]