Let F(t) and G(t) be the distribution functions for the two populations. The null and alternative hypotheses for the
two-sampleKolmogorov–SmirnovtestarethenH0 :F(t)=G(t)foralltandH1 :F(t)̸=G(t)forsomet.Onecomputesthe
empirical distribution functions Fˆ(t) = 1 n I(Xi ≤ t) and Gˆ(t) = 1 m I(Yj ≤ t), where I(A) is the indicator function n i=1 m j=1
that is one if A holds and zero otherwise. The test statistic is then DKS = supt |Fˆ(t) − Gˆ(t)|, and one rejects H0 when DKS is excessively large. Exact critical values were tabled by Kim and Jennrich (1974), and accurate asymptotic approximations have also been developed (see Kim, 1969).