0

I just realize that when I try to test if a dataset have or not a normal distribution with the next code:

ks.test(rnorm(1000, mean = 60, sd = 9 ), "pnorm")

I get the next p value: p-value < 2.2e-16

Is this correct? I think that in this case I should get a p value greater than 0.05, Any idea of what is going on here?

I expect to the H0 not being rejected.

neilfws
  • 32,751
  • 5
  • 50
  • 63
  • 2
    The default parameters for `pnorm` are mean = 0, sd = 1. So you are comparing two quite different distributions. If you try `ks.test(rnorm(1000, 60, 9), "pnorm", 60, 9)` you'll get the expected result. – neilfws Aug 18 '23 at 03:12

0 Answers0