help-octave
[Top][All Lists]
Advanced

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

kolmogorov smirnov test. Normal distribution


From: A. Kalten
Subject: kolmogorov smirnov test. Normal distribution
Date: Thu, 24 Apr 2008 13:21:30 -0400

>>  [pval, ks] = kolmogorov_smirnov_test(X,'normal',mean(X),var(X), "<>");
>>  pval
>>  pval = 0.92970
>>  ks
>>  ks = 0.54297

> In minitab (see above) I have got KS=0.140 which is very different from
> octave value for this.
> And I still can't get why.  Do I have a crappy statistical software
> (minitab)?  Or do I use octave incorrectly?
> Or what?

The octave source code for the KS test shows that the algorithm
used differs from the algorithm that may be used by other statistics
packages, such as R and presumably minitab.  In particular, the ks
statistic is scaled by sqrt(n), where n is the number of data points.
Also, the octave code uses a slightly different method to determine
the maximum difference between the cumulative distributions.

The reasons for these differing algorithms are somewhat complex
mathematically, but if you are interested there is a lot of
information available on the web.

It would be nice if each octave function had references included
within the source file so that the theoretical background of the
function could be researched.  It's never a good idea to use any
function in a blind manner.

AK



reply via email to

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