This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / stats / _stats_py / _count_paths_outside_method

function

scipy.stats._stats_py:_count_paths_outside_method

source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_stats_py.py:7777

Signature

def _count_paths_outside_method(m, n, g, h)

Summary

Count the number of paths that pass outside the specified diagonal.

Parameters

m : int

m > 0

n : int

n > 0

g : int

g is greatest common divisor of m and n

h : int

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

Returns

p : float

The number of paths that go low. The calculation may overflow - check for a finite answer.

Notes

Count the integer lattice paths from (0, 0) to (m, n), which at some point (x, y) along the path, satisfy: m*y <= n*x - h*g The paths make steps of size +1 in either positive x or positive y directions.

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.

Aliases

  • scipy.stats._stats_py._count_paths_outside_method