I tried to use the Kolmogorov-Smirnov test to test normality of a sample. This is a small simple example of what I do:
x <- rnorm(1e5, 1, 2)
ks.test(x, "pnorm")
Here is the result R gives me:
One-sample Kolmogorov-Smirnov test
data: x
D = 0.3427, p-value < 2.2e-16
alternative hypothesis: two-sided
The p-value is very low whereas the test should accept the null-hypothesis.
I do not understand why it does not work.