[SciPy-dev] stats - kstest
oliphant at ee.byu.edu
Mon Jul 19 11:13:57 CDT 2004
Manuel Metz wrote:
> So the main difference is, that in the NR algorithm the "D" is
> calculated as the maximum distance D = max |S_N(x) - P(x)| by
> calculating the distances to the upper AND the lower side of P(X) to
> the step function S_N(x), while in the SciPy routine only the distance
> to the upper side is calculated.
> Is my suggestion right, that the error is in the SciPy algorithm? If
> yes, could anyone correct it with the next release of SciPy?
Is the following correction acceptable? If so we will change kstest...
If not suggestions are
D1 = sb.amax(abs(cdfvals - sb.arange(1.0,N+1)/N))
D2 = sb.amax(abs(cdfvals - sb.arange(0.0,N)/N))
D = max(D1,D2)
More information about the Scipy-dev