You are viewing an older version (1.17.1).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 1.17.1 / scipy / stats / _stats_py / _compute_d

function

scipy.stats._stats_py:_compute_d

source: /scipy/stats/_stats_py.py:7375

Signature

def _compute_d(cdfvals, x, sign, xp = None)

Summary

Computes D+/D- as used in the Kolmogorov-Smirnov test.

Extended Summary

Vectorized along the last axis.

Parameters

cdfvals : array_like

Sorted array of CDF values between 0 and 1

x: array_like

Sorted array of the stochastic variable itself

sign: int

Indicates whether to compute D+ (+1) or D- (-1).

Returns

: res: Pair with the following elements:
  • The maximum distance of the CDF values below/above (D+/D-) Uniform(0, 1).

  • The location at which the maximum is reached.

Aliases

  • scipy.stats._stats_py._compute_d