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

    Function dwilcox

    • Probability mass function of the distribution of the Wilcoxon rank sum statistic (Mann-Whitney U). Equivalent to R's dwilcox(x, m, n, log = FALSE).

      Unlike R, memory use grows only with the range of the statistic (at most m * n / 2), so large samples such as m = n = 500 work.

      Type Parameters

      Parameters

      • x: T

        Value(s) at which to evaluate: a number, number[] or Float64Array. The result has the same shape.

      • m: number

        Size of the first sample.

      • n: number

        Size of the second sample.

      • options: DensityOptions = {}

        log (see DensityOptions).

      Returns VectorResult<T>

      The probability (or log probability).

      RangeError if m and n are so large that the required table cannot be allocated or would take more than 2^29 steps to build (min(m, n) times its length; about 6 to 8 s), or that the table loses its accuracy (near the center for m = n >= 550 or so; the tails stay available).

      dwilcox(5, 4, 6);        // 0.02857142857142857
      dwilcox([0, 1, 2], 3, 4); // [0.02857142857142857, 0.02857142857142857, 0.05714285714285714]