On Mar 13, 2010, at 2:34 PM, Tal Galili wrote:
Hello all,
A friend just showed me how ks.test fails to work with pbinom for
small
"size".
Example:
x<-rbinom(10000,10,0.5)
x2<-rbinom(10000,10,0.5)
ks.test(x,pbinom,10,0.5)
ks.test(x,pbinom,size = 10, prob= 0.5)
ks.test(x,x2)
The tests gives significant p values, while the x did come from
binom with size = 10 prob = 0.5.
The first sentence of Details in the ks.test help page:
"If y is numeric, a two-sample test of the null hypothesis that x and
y were drawn from the same _continuous_ distribution is
performed." (_continuous_ in italics.)
This has come up in r-help so frequently that I nominate it for
addition to the FAQ. Searching with RSiteSearch() on "ks.test" with
"ties" or "continuous" should bring up useful commentary from experts.
--
David.
What test should I use instead ?
Thanks,
Tal
[[alternative HTML version deleted]]
David Winsemius, MD
West Hartford, CT
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.