On Fri, Nov 2, 2012 at 1:42 AM, Peng Yu <

[hidden email]> wrote:

> Hi,

>

> The following shows that octave and R returns different results for

> K-S test. I think that the result from R is correct. Does anybody know

> why kolmogorov_smirnov_test_2 is different? Or I call it incorrectly?

>

> octave:1> kolmogorov_smirnov_test_2([1 2 3 4 5], [11 12 13 14 15])

> pval: 0.0134759

> ans = 0.013476

>

>

> From R

>

>> ks.test(1:5, 11:15)

>

> Two-sample Kolmogorov-Smirnov test

>

> data: 1:5 and 11:15

> D = 1, p-value = 0.007937

> alternative hypothesis: two-sided

>

>

>

> --

> Regards,

> Peng

> _______________________________________________

> Help-octave mailing list

>

[hidden email]
>

https://mailman.cae.wisc.edu/listinfo/help-octaveIt is hard to say and I can't find any situation when the conclusion

in Octave is wrong.

Could you please check the formulas in this paper (freely available)?

http://www.jstatsoft.org/v08/i18/These are the ones used for the two-sided test in R. Maybe the Octave

version is using the approximation that R is not using. Can't say!

Just in case I added the mail of the author to this discussion.

Cheers

_______________________________________________

Help-octave mailing list

[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave