[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Kolmogorov-Smirnov test
From: |
Mike Miller |
Subject: |
Re: Kolmogorov-Smirnov test |
Date: |
Thu, 17 Nov 2005 18:29:58 -0600 (CST) |
On Thu, 17 Nov 2005, Hamish Allan wrote:
The k-s test (not k-s2) is used for testing if a sample came from a
given population. In your case the "given population" is given by the
original sample. It tests a particular kind of deviation though, maybe
not what you want to know. I don't know what it does with ties in the
Octave version.
The difference between the octave functions kolmogorov_smirnov_test()
and kolmogorov_smirnov_test_2() seems to be that the former takes a
description for the "given population" whereas the latter takes a
sample.
Both return a p-value, though, so I was wondering how I might use
them... then I noticed that kolmogorov_smirnov_test_2() also returns a
value D which is the maximum vertical difference between the two
cumulative distibution functions. I'm not sure why maximum vertical
difference should be a better measure than sum of vertical distances,
but at least I now have a measure :)
You can also use the p-value. A larger p-value from
kolmogorov_smirnov_test() means that your sample distribution is always
reasonably close to the given population distribution. If you are doing
random sampling and want your result to be closer than usual, require p >
0.5, or something even bigger than that.
Mike
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------