17.5.5 Two-Sample Kolmogorov-Smirnov Test


Introduction

The Kolmogorov-Smirnov test ( KS-test) is one of the useful and general nonparametric method for comparing two samples. It can be used to test whether the two samples are different in the location and the shape of empirical distribution functions. As a nonparametric test, it does not require the normality of the population.

The KS-test is based on the empirical distribution function. From the empirical distribution function. We can see the difference from the two samples. And then determine whether to reject the null hypothesis or not.

Handling Missing Values

The missing values in the data range will be excluded in the analysis

From Origin 2015, missing values in the grouping range and the corresponding data values will be excluded in analysis. In the previous version, missing values in the grouping range will be considered as a group.

Performing Two-Sample Kolmogorov-Smirnov Test

To perform a one-sample a two-sample Kolmogorov-Smimov test:

  1. Select Statistics: Nonparametric Tests: Two-Sample Kolmogorov-Smirnov Test. This menu command opens the kstest2 dialog box.
  2. Specify the Input Data, and the desired Alternative Hypothesis.
  3. After clicking OK, a report table sheet will be generated to show the frequency table, degrees of freedom, the D and Z statistics, the associated p-value, and the test conclusion.

Topics covered in this section: