[SciPy-user] new Kolmogorov-Smirnov 2-sample test not Numerical Recipes based

josef.pktd@gmai... josef.pktd@gmai...
Wed Dec 3 21:31:03 CST 2008


Hi,

I forgot to ask:

I took the speed of convergence correction for the asymptotic KS
distribution from the existing implementation. With a quick look on
the internet I didn't find any reference for the correction.

en = np.sqrt(n1*n2/float(n1+n2))      # same as in
http://en.wikipedia.org/wiki/Kolmogorov-Smirnov_test
prob = ksprob((en+0.12+0.11/en)*d)

I'm curious why it is not just the sqrt(n) analog, i.e. prob = ksprob(en*d)

I tried it in the Monte Carlo and ksprob(en*d) has slightly less power
than ksprob((en+0.12+0.11/en)*d).

Josef


More information about the SciPy-user mailing list