On the Internet there is an example of k-s test being applied relative to distribution of number of bird varieties over different five hour periods. The observed distribution was:
The expected distribution (if there is no difference between the five hours) could be:
After I found the two cumulate distributions, I calculated manually, D = 0,4667 (a value that is similar with the internet). But if I try to use R, I find a different value of D:
> a=c(0,1,1,9,4) > b=c(3,3,3,3,3) > ks.test(a,b) Two-sample Kolmogorov-Smirnov test data: a and b D = 0.6, p-value = 0.3291 alternative hypothesis: two-sided .......
- What is leading to the difference between my manual calculation and result that R gives?