help-octave
[Top][All Lists]
Advanced

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

Re: kolmogorov_smirnov_test_2 vs. kstest2


From: Juan Pablo Carbajal
Subject: Re: kolmogorov_smirnov_test_2 vs. kstest2
Date: Thu, 26 Jul 2012 12:43:13 +0200

On Wed, Jul 25, 2012 at 11:55 PM, Doktor Bernd <address@hidden> wrote:
> 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
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
>

Looking at the code in kolmogorov_smirnov_test.m ks has other
expressions depending on the test.
Are you looking at kolmogorov_smirnov_test_2.m?

I added teh author in CC, maybe he can give you more information.

-- 
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/


reply via email to

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