If we would like to compare the two samples and and would like to know whether the underlying distributions are the same, we may use the test statistic
where and resp. are the empirical distribution functions. Again, for continuous , the null distribution of does not depend on . may be calculated as follows:
Finally, has an asymptotic distribution function .