Two Sample Smirnov Test

 

Menu location: Analysis_Nonparametric_Smirnov Two Sample.

 

This function compares the distribution functions of the parent populations of two samples.

 

If you have two independent samples which may have been drawn from different populations then you might consider looking for differences between them using a t test or Mann-Whitney test. Mann-Whitney and t tests are sensitive to differences between two means or medians but do not detect other differences such as variance. The Smirnov test (a two sample version of the Kolmogorov test) detects a wider range of differences between two distributions.

 

The test statistic for the two sided test is the largest vertical distance between the empirical distribution functions. In other words, if you plot the sorted values of sample x against the sorted values of sample y as a series of increasing steps then the test statistic is the maximum vertical gap between the two plots.

 

The test statistics for the one sided tests are the largest vertical distance of one distribution function above the other and vice versa.

 

The alternative hypothesis for the two sided test is that the distribution functions for x and y are different for at least one observation. The alternative hypotheses for the one sided tests are a) the distribution function for x is greater than that for y for at least one observation and b) the distribution function for x is less than that for y for at least one observation.

 

The two sample Smirnov method tests the null hypothesis that the distribution functions of the populations from which your samples have been drawn are identical

 

Assumptions:

 

Technical Validation

P values for the test statistics are calculated by permutation of the exact distribution whenever possible (Conover, 1999; Nikiforov, 1994; Kim and Jennrich 1973).

 

Example

From Conover (1999).

Test workbook (Nonparametric worksheet: Xi, Yi).

 

Xi Yi
7.6 5.2
8.4 5.7
8.6 5.9
8.7 6.5
9.3 6.8
9.9 8.2
10.1 9.1
10.6 9.8
11.2 10.8
  11.3
  11.5
  12.3
  12.5
  13.4
  14.6

 

To analyse these data in StatsDirect you must first enter them into two workbook columns and label them appropriately. Alternatively, open the test workbook using the file open function of the file menu. Then select the Smirnov Two Sample test from the from the Nonparametric section of the analysis menu. Select the columns marked "Xi" and "Yi" when prompted for data.

 

For this example:

 

Two sided test:

D = 0.4

P = .2653

 

One sided test (suspecting Xi shifted left of Yi):

D = 0.4

P = .1326

 

One sided test (suspecting Xi shifted right of Yi):

D = 0.333333

P = .2432

 

Thus we can not reject the null hypothesis that the two populations from which our samples were drawn have the same distribution function.

 

If we were interested in a one sided test then we would need good reason for expecting one group to yield values above (distribution shifted to the right of) or below (distribution shifted to the left of) the other group. For these data neither of the one sided tests reached significance.

 

P values

 

 

Copyright © 2000-2017 StatsDirect Limited, all rights reserved. Download a free trial here.