What is a KS test in statistics?

What is a KS test in statistics?

In statistics, the Kolmogorov–Smirnov test (K–S test or KS test) is a nonparametric test of the equality of continuous (or discontinuous, see Section 2.2), one-dimensional probability distributions that can be used to compare a sample with a reference probability distribution (one-sample K–S test), or to compare two …

What does the K-S value mean?

The K-S statistic reported is alpha, where alpha is the reject level for the hypothesis that the fitted curve is the same as the empirical curve. K-S should be a high value (Max =1.0) when the fit is good and a low value (Min = 0.0) when the fit is not good.

How to compare two distributions using discrete KS?

The following is a procedure to conduct the discrete KS test for two samples: Find the min and max of the combined sample to define our range. e.g. for a sample size of 500, we can expect 25 samples per bin by choosing 20 buckets.

How to calculate the KS test statistic distribution?

By repeating this process 1000 times, we will have 1000 KS test statistics, which gives us the KS test statistic distribution below. The red line is the actual test statistic and the green line is the test statistic for 1000 random normal variables.

Why is the KS test used for discrete variables?

In practice, the discrete version of the KS test is often appropriate because of rounding. Although variables such as time and price are theoretically continuous, these are often considered discrete variables due to rounding, which gives us a finite set of possible values.

Can a Kolmogorov Smirnov test be used for discrete distributions?

A Kolmogorov-Smirnov test was suggested to me. Conover ( Practical Nonparametric Statistics, 3d) seems to say that the Kolmogorov-Smirnov Test can be used for this purpose, but its behavior is “conservative” with discrete distributions, and I’m not sure what that means here. DavidR’s comment on another question says “…