[SciPy-dev] stats - kstest
Travis Oliphant
oliphant at ee.byu.edu
Mon Jul 19 12:13:57 EDT 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
encouraged...
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)
-Travis
More information about the SciPy-Dev
mailing list