[R] Kolmogorov Smirnov p-values

Samsiddhi Bhattacharjee samsiddhi.bhattacharjee at gmail.com
Thu Sep 2 15:52:22 CEST 2010


I was just testing out ks.test()

> y <- runif(10000, min=0, max=1)
> ks.test(y, runif, min=0, max=1, alternative="greater")

	One-sample Kolmogorov-Smirnov test

data:  y
D^+ = 0.9761, p-value < 2.2e-16
alternative hypothesis: the CDF of x lies above the null hypothesis
>

It seems that everytime I run it, I get a highly significant p-value
(for two sided
or one-sided , exact=TRUE or FALSE). Can anybody tell me what is going on ?



More information about the R-help mailing list