Understanding the Kolmogorov–Smirnov test

  • Thread starter Thread starter JoePhysicsNut
  • Start date Start date
  • Tags Tags
    Test
AI Thread Summary
The discussion centers on the use of the Kolmogorov–Smirnov test for comparing two histograms, with a focus on the interpretation of the returned probability value (PROB). The function yields a value of 1 for identical histograms and values between 0.05 and 0.25 for reasonably compatible ones. A key point of confusion is the statement that PROB is uniformly distributed for compatible histograms, which raises questions about how a single test result can reflect a distribution. Clarification suggests that the uniform distribution reference pertains to the theoretical behavior of the KS statistic across many tests, implying that compatible distributions yield consistent results. Overall, the discussion emphasizes the need for a clearer understanding of the statistical principles underlying the KS test.
JoePhysicsNut
Messages
35
Reaction score
0
Dear all,

I am using some software to perform a two-sample Kolmogorov–Smirnov test. Specifically, I am testing the compatibility of two histograms.

The function returns a single number that is 1 for a perfect match (when I compare the histogram to itself) and somewhere between 0.05 to 0.25 for histograms that show reasonable compatibility.

The method seems to work as I expect, but there is a sentence in the description of the function that I do not understand:

"The returned value PROB is calculated such that it will be uniformly distributed between zero and one for compatible histograms".


Each test yields one value not many, so can't be distributed in any way. If it's over many tests, then compatible histograms should yield a high value for PROB and incompatible ones a low value. Why/how would the distribution be uniform?

Note that I'm not a statistics expert to a friendly explanation would be very welcome.
 
Physics news on Phys.org
Perhaps the documentation is a mangled attempt to say that the distribution of the KS two sample statistic is the same if both distributions are the same - regardless of the shape of the common distribution. Hence the distribution of the KS statistic can be calculated by assuming the common distribution is a uniform distribution for the sake of simplicity. ( - so says a poster in http://stats.stackexchange.com/questions/17495/kolmogorov-smirnov-two-sample-p-values)
 
Back
Top