Smirnov Test


Smirnov Test on Two Independent Samples

This test is useful where two samples are drawn, one from each of two populations (which could be different), and we wish to know whether the the two distribution functions associated with the populations are identical or not.

Both the t-test (parametric) and the Mann-Whitney test are sensitive to differences between the two means or medians but may not be sensitive to other differences, eg. variances. The Smirnov test is sensitive to all types of differences between the two distribution functions.

Script operation

This tool operates in much the same way as most of the others.

Click here for information about general script usage.

The data consists of two independent continuous random samples that we assume are mutually independent, and that have a measurement scale which is at least ordinal.

(If the random variables are discrete instead of continuous, the test is still valid but becomes conservative).

There are three test statistics based on the two distribution functions (S1(x) and S2(y)):

Two-sided T = sup|S1(x)-S2(y)|

One-sided T1= sup[S1(x)-S2(y)]

One-sided T2= sup[S2(y)-S1(x)]

Hypotheses:

(a) Two-sided: 	Ho: F(x)=G(x) for all x
		H1: F(x)~=G(x) for at least one value of x

(b) One-sided:	Ho: F(x)<=G(x) for all x
		H1: F(x)>G(x) for at least one value of x

(c) One-sided:	Ho: F(x)>=G(x) for all x
		H1: F(x)<G(x) for at least one value of x

In this example, two random samples of size 9 and 15 are tested.

X	Y
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

Script Output:

Smirnov Two Sample Test 					
					
S1(x)	S2(x)	S1(x)-S2(x)	S2(x)-S1(x)	Smirnov T	
0	0.0667	-0.0667		0.0667		(Two-Sided)	
0	0.1333	-0.1333		0.1333		0.4	
0	0.2	-0.2		0.2		(One-Sided:S1>S2)	
0	0.2667	-0.2667		0.2667		0.4	
0	0.3333	-0.3333		0.3333		(One-Sided:S2>S1)	
0.1111	0.3333	-0.2222		0.2222		0.333333	
0.1111	0.4	-0.2889		0.2889		
0.2222	0.4	-0.1778		0.1778		
0.3333	0.4	-0.0667		0.0667		
0.4444	0.4	0.0444		-0.0444		
0.4444	0.4667	-0.0222		0.0222		
0.5556	0.4667	0.0889		-0.0889		
0.5556	0.5333	0.0222		-0.0222		
0.6667	0.5333	0.1333		-0.1333		
0.7778	0.5333	0.2444		-0.2444		
0.8889	0.5333	0.3556		-0.3556		
0.8889	0.6	0.2889		-0.2889		
1	0.6	0.4		-0.4		
1	0.6667	0.3333		-0.3333		
1	0.7333	0.2667		-0.2667		
1	0.8	0.2		-0.2		
1	0.8667	0.1333		-0.1333		
1	0.9333	0.0667		-0.0667		
1	1	0		0		

Interpretation

Specific tables need to be consulted that give quantiles of the Smirnov test statistic for two samples to assess the output. For n=9 and m=15 with a two-sided test, the table indicates that W0.95=0.5333, therefore Ho is accepted at the 95% level.



Back to Main Document