help-octave
[Top][All Lists]
Advanced

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

kolmogorov smirnov test. Normal distribution


From: John W. Eaton
Subject: kolmogorov smirnov test. Normal distribution
Date: Thu, 24 Apr 2008 13:34:09 -0400

On 24-Apr-2008, A. Kalten wrote:

| 
| >>  [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.

If you look at the source for the k-s function in Octave, you'll see
that it was written by someone who is now a member of the R-core
development group.  Please remember that nearly everyone working on
Octave is a volunteer.  It's not that we are trying to do a bad job
here.  If you know better, then perhaps you could contribute a fix?

jwe


reply via email to

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