{ } Raw JSON

bundles / scipy 1.17.1 / scipy / stats / _stats_pythran / _compute_outer_prob_inside_method

built-in

scipy.stats._stats_pythran:_compute_outer_prob_inside_method

Summary

Count the proportion of paths that do not stay strictly inside two diagonal lines.

Extended Summary

Supported prototypes:

  • _compute_outer_prob_inside_method(int64, int64, int64, int64)

Parameters

m : integer

m > 0

n : integer

n > 0

g : integer

g is greatest common divisor of m and n

h : integer

0 <= h <= lcm(m,n)

Returns

p : float

The proportion of paths that do not stay inside the two lines.

: The classical algorithm counts the integer lattice paths from (0, 0)
: to (m, n) which satisfy |x/m - y/n| < h / lcm(m, n).
: The paths make steps of size +1 in either positive x or positive y
: directions.
: We are, however, interested in 1 - proportion to computes p-values,
: so we change the recursion to compute 1 - p directly while staying
: within the "inside method" a described by Hodges.
: We generally follow Hodges' treatment of Drion/Gnedenko/Korolyuk.
: Hodges, J.L. Jr.,
: "The Significance Probability of the Smirnov Two-Sample Test,"
: Arkiv fiur Matematik, 3, No. 43 (1958), 469-86.
: For the recursion for 1-p see
: Viehmann, T.: "Numerically more stable computation of the p-values
: for the two-sample Kolmogorov-Smirnov test," arXiv: 2102.08037

Aliases

  • scipy.stats._stats_py._compute_outer_prob_inside_method