Understanding the Kolmogorov–Smirnov test

  • Thread starter JoePhysicsNut
  • Start date
  • Tags
    Test
In summary, a user is using software to perform a two-sample Kolmogorov-Smirnov test on histograms and is confused about a sentence in the function's description. They question how the returned value is uniformly distributed if only one value is returned per test. They also mention they are not an expert in statistics and would like a simpler explanation. Another user suggests that the distribution of the KS two-sample statistic can be calculated by assuming a uniform distribution for simplicity, regardless of the shape of the common distribution.
  • #1
JoePhysicsNut
35
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
  • #2
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)
 

What is the Kolmogorov-Smirnov test?

The Kolmogorov-Smirnov test is a statistical test used to determine if a sample of data follows a specific probability distribution. It compares the empirical distribution of the data to the theoretical distribution and calculates a statistic that measures the maximum distance between the two distributions.

What is the purpose of the Kolmogorov-Smirnov test?

The purpose of the Kolmogorov-Smirnov test is to determine whether a set of data follows a specific distribution, such as a normal or exponential distribution. It can also be used to compare two samples to see if they come from the same distribution.

How is the Kolmogorov-Smirnov test performed?

To perform the Kolmogorov-Smirnov test, the researcher first specifies the theoretical distribution that they believe the data should follow. Then, the test calculates the maximum difference between the empirical distribution of the data and the theoretical distribution. This difference is compared to a critical value from a table to determine the significance of the results.

What are the assumptions of the Kolmogorov-Smirnov test?

The Kolmogorov-Smirnov test assumes that the data is continuous, that the observations are independent and identically distributed, and that the sample size is large enough to accurately represent the population. It also assumes that the theoretical distribution is fully specified and does not contain any unknown parameters.

What are the limitations of the Kolmogorov-Smirnov test?

The Kolmogorov-Smirnov test can only detect differences between the empirical and theoretical distributions. It cannot explain the reasons for these differences or identify which specific part of the distribution is different. It also assumes that the data is independent, which may not always be the case. Additionally, it may not be as powerful as other tests for specific distributions.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
Replies
1
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
791
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
2K
Back
Top