Wednesday, 20 November 2013

Two-sample Kolmogorov-Smirnov Test Calculator

Enter first dataset samples
Enter second dataset samples

This blog post implements the two-sample Kolmogorov-Smirnov Test - so far, the results have been verified against those from GNU Octave and are in agreement.

Each of the two text boxes stores a single group/dataset and needs to be filled in with comma separated numbers. Alternatively, you can choose two file entry methods:-

  1. Select multiple single column CSV files to populate the text boxes by repeatedly pressing the Choose File button - there must be one distinct (and differently named) file for each text box i.e. one file per group. Each file can have a different number of samples.
  2. Select a single multi-column CSV file by pressing the Choose File button once, where the number of columns equals the number of groups - all groups need to have the same number of samples.

The graphs at the bottom will display CDFs for all the datasets, once the Plot CDF button is pressed.

You can initiate the zoom facility by first pressing the Plot CDF button, then selecting a rectangle in either the shorter ("overview") graph display or in the main graph. To undo the zoom process, simply press the Plot CDF button again.

Below the graphs, summary statistics for all the plotted datasets will be displayed in a table format when the Plot CDF button is pressed.

The CDF plotter can be used to measure various interquartile ranges.

CDF of the two datasets
Cum. Freq.
Sample value
Cum Freq

KS results pending..