Skip to content
Prev 106252 / 398506 Next

ks.test "greater" and "less"

On Sat, 16 Dec 2006, R. Villegas wrote:

            
The help page says:

      This is a comparison of cumulative distribution
      functions, and the test statistic is the maximum difference in
      value, with the statistic in the '"greater"' alternative being D^+
      = max_u [ F_x(u) - F_y(u) ].

data1 and data2 have the same empirical CDF, so should and do give the 
same value of the test statistic.

We cannot know what you misunderstanding is, since you have not explained 
your expectations.
You can: the distribution theory is exact.