Kolmogorov-Smirnov (K-S) Test Calculator
How to use this tool
Data Set 1: Sample | Data Set 2: Population |
X1 | Y1 |
X2 | Y2 |
X3 | Y3 |
X4 | Y4 |
… | … |
Users can either enter two data sets to compare distributions between populations or enter a single data set to compare sample distribution against a normal distribution. Place sample in Set 1. To add a new data set, press on the ‘+’ tab above the data entry area. If Set 2 is not included then a normally distributed data set will be assumed. Data sets can be renamed by double clicking the tab. Each dataset will generate an output with D-statistic, p-value, the alternative hypothesis, and graphical representations in the form of histogram, normal curve, and empirical distribution function.
2. Verify your data is accurate in the table that appears.
3. Press the "Calculate K-S Test" button to display results.
Data Entry
Additional Information
The Kolmogorov-Smirnov Test, more commonly referred to as the K-S Test, is a non-parametric and distribution free statistical analysis used to determine sample distribution in a population. In addition to calculating the D-statistic and p-value for the data set, the output generates the alternative hypothesis and several graphical representations in the form of histograms, normal curves, and empirical distribution functions, all of which helps in understanding sample distribution.
K-S test relies on the empirical distribution function (ECDF) to test the agreement between two cumulative distributions. For N ordered data points i.e. Y1, Y2, …, YN, the ECDF is defined to be
EN=n(i)/N
where n(i) is the number of points less than Yi and the values for Yi are sorted in ascending order. The equation generates an increasing step function that grows by 1/N at each ordered data point. K-S test operates by comparing the empirical distribution function to a theoretical distribution and calculating the maximum distance between the two curves, which is represented by the D value. The null hypothesis states that there is no difference between the two distributions. A p value is obtained representing the probability that the null hypothesis is true and takes into account the comparison of D with the critical value, c(α), where c(α) is a size-independent function with α as the chosen significance level for statistical significance. For p < α, the null hypothesis is rejected, suggesting that the two populations are from different distributions. Similarly, if p > α, the null hypothesis is accepted and the population distributions are deemed to be the same.
c(α)=sqrt(-ln(α/2)*(1/2))
Dn,m > c(α)*sqrt((n+m)/(n*m))
The relationship of the test statistic (D value) to the significance level (α) should also be taken into consideration. For a low α value, a large difference in the populations is needed to reject the null hypothesis, indicating a higher D value. A significantly high α means that even small differences in the distributions are magnified and will lead to rejecting the null hypothesis regardless of small D values. Consequently, the null hypothesis is rejected for all data sets that are not from the same continuous distribution. K-S test is especially useful in understanding distribution of data and distinguishing among the various distribution types, such as normal, log-normal, Weibull, exponential, and logistic.
Feedback
Have a question or a feature request about this tool? Feel free to reach out to us and let us know! We're always looking for ways to improve!References
This online tool may be cited as follows
MLA | "Quest Graph™ Kolmogorov-Smirnov (K-S) Test Calculator." AAT Bioquest, Inc., 21 Nov. 2024, https://www.aatbio.com/tools/kolmogorov-smirnov-k-s-test-calculator. | |
APA | AAT Bioquest, Inc. (2024, November 21). Quest Graph™ Kolmogorov-Smirnov (K-S) Test Calculator. AAT Bioquest. https://www.aatbio.com/tools/kolmogorov-smirnov-k-s-test-calculator. | |
BibTeX | EndNote | RefMan |
This online tool has been cited in 12 publications, including
Authors: T{\'o}th, Csilla and Simon, L{\'a}szl{\'o} and T{\'o}th, Brigitta
Journal: Agronomy (2024): 1625
Authors: Wright, Derek and Jarvie, Michelle M and Southwell, Benjamin and Kincaid, Carmen and Westrick, Judy and Perera, S Sameera and Edwards, David and Cody, Robert B
Journal: ACS Omega (2024)
Authors: Panyutina, Aleksandra A and Kuznetsov, Alexander N
Journal: Journal of Morphology (2024): e21669
Authors: Nikitin, Alexey G and Ivanova, Svetlana and Culleton, Brendan J and Potekhina, Inna and Reich, D
Journal: SSRN Electronic Journal (2023)
Authors: de Caritat, Patrice and Grunsky, Eric and Smith, David B
Journal: (2023)
Authors: Hu, Hsiao-Tang and Lin, Yung-Jui and Wang, Ueh-Ting Tim and Lee, Sue-Ping and Liou, Yae-Huei and Chen, Bi-Chang and Hsueh, Yi-Ping
Journal: PLoS biology (2023): e3002274
Authors: Craig, Mia
Journal: (2022)
Authors: Schumm, Walter R and Dugan, Merrick and Nauman, William and Sack, Briana and Maldonado, Julian and Conyac, Cayden and Patterson, Clay
Journal: (2021)
Authors: Rich, Debra J
Journal: (2021)
Authors: Barnes, Christopher O and West Jr, Anthony P and Huey-Tubman, Kathryn E and Hoffmann, Magnus AG and Sharaf, Naima G and Hoffman, Pauline R and Koranda, Nicholas and Gristick, Harry B and Gaebler, Christian and Muecksch, Frauke and others,
Journal: Cell (2020): 828--842
Authors: Shih, Pu-Yun and Hsieh, Bing-Yuan and Tsai, Ching-Yen and Lo, Chiu-An and Chen, Brian E and Hsueh, Yi-Ping
Journal: Acta neuropathologica communications (2020): 1--19
Authors: Chen, Chih-Hsiung and Patel, Rahul and Bortolami, Alessandro and Sesti, Federico
Journal: PloS one (2020): e0240255