Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Understanding the Kolmogorov–Smirnov test

  1. Apr 22, 2013 #1
    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.
  2. jcsd
  3. Apr 22, 2013 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    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)
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Understanding the Kolmogorov–Smirnov test
  1. Kolmogorov randomness (Replies: 6)