I'm confused about the appropriate interpretation of p-values returned by the two-sample Kolmogorov-Smirnov test (ks.test) in R.
In slide 23 of this presentation about non-parametric two-sample tests, the author states that when analyzing the ks.test results:
ks.test(male, female)
Two-sample Kolmogorov-Smirnov test
data: male and female
D = 0.8333, p-value = 0.02597
the p-value
needs to be multiplied by 2 for a 2-tail test. Thus, P = 0.05194
Is that true?
If we used the original p = 0.02597, we would reject the hypothesis that the distributions similar, because p < 0.05, correct? Whereas if we multiply it by 2, the p would suggest that there is no difference between distributions, since p > 0.05?
What am I missing?
ks.test
documents an optional parameteralternative
that specifies the kind of test. Why don't you use it and see what the answer is? (Or you could just trust the account of the test in the "Details" section of that page.) $\endgroup$alternative="two-sided"
is the default, which is why nothing changed. Try the other alternatives. I won't speculate on what the author of that presentation might have been thinking. $\endgroup$less
andgreater
which is not what I need. My goal is to simply check if two distributions have "similar shape" so I'll take the p-vale produced by the ks.test at, well, face-value. $\endgroup$