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: Doktor Bernd
Subject: RE: kolmogorov_smirnov_test_2 vs. kstest2
Date: Thu, 26 Jul 2012 10:51:06 +0000



> Date: Thu, 26 Jul 2012 12:43:13 +0200
> Subject: Re: kolmogorov_smirnov_test_2 vs. kstest2
> From: address@hidden
> To: address@hidden; address@hidden
> CC: address@hidden
>
> 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/

Hi,

yes, I am comparing kolmogorov_smirnov_test_2.m from Octave with kstest2.m from Matlab.
Both functions should do the two-sided Kolmogorov-Smirnov-Test.

Bernd



reply via email to

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