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

    Function pgeom

    • Distribution function of the geometric distribution (number of failures before the first success). Equivalent to R's pgeom(q, prob, lower.tail = TRUE, log.p = FALSE).

      Type Parameters

      Parameters

      • q: T

        Quantile(s): 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 probability (or log probability).

      pgeom(2, 0.3);                       // 0.657
      pgeom(2, 0.3, { lowerTail: false }); // 0.343