help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kolmogorov_smirnov_test_2 vs. kstest2


From: Doktor Bernd
Subject: kolmogorov_smirnov_test_2 vs. kstest2
Date: Wed, 25 Jul 2012 21:55:31 +0000

Hi,

I have a problem using/understanding Octave's Kolmogorov-Smirnov Test implementation. I am comparing it with Matlab's kstest2.

For the calculation of the p-Value, the following is done in Octave

    ks   = sqrt (n) * d;
    pval = 1 - kolmogorov_smirnov_cdf (ks);

To obtain the same result as produced by kstst2 from Matlab, the calculation is

    lambda =  max((sqrt(n) + 0.12 + 0.11/sqrt(n)) * d , 0);
    pval = 1 - kolmogorov_smirnov_cdf (lambda);

Why is Octave using ks when Matlab is using lambda?
Matlabs version is the same as proposed by the Numerical Recipes book, where does Octave's implementation come from?

Matlab then rejects H0 if  (alpha >= pval)

Since I assume that the meaning of Octave's pval is different, when should I reject H0 in Octave?

Thanks for reading,
Bernd

reply via email to

[Prev in Thread] Current Thread [Next in Thread]