Solved – How to interpret Kolmogorov-Smirnov Test results in R

kolmogorov-smirnov testnormal distributionr

I'm using 50,000 values of data. I can't perform a K.Wallis test in R because my data amount is bigger than 5000. Therefore I considered to use Kolmogorov-Smirnov test.

I guess that my data follows a normal distribution. However, I would like to be sure using the Ks.test. In R script I wrote:

ks.test(dat$Si,"pnorm",alternative = c("two.sided"),exact = NULL)

R results are:

data:  dat$Si 
D = 0.904, p-value < 2.2e-16
alternative hypothesis: two-sided 

Mensajes de aviso perdidos
In ks.test(dat$Si, "pnorm", alternative = c("two.sided"), exact = NULL) :
ties should not be present for the Kolmogorov-Smirnov test

What does it mean? My result follows a normal distribution or not? I guess that If I have this small p-value, it means that I must reject the Null Hypothesis. So they don't follow a normal distribution.

Am I doing something wrong?

Best Answer

Based on (Hair et al., 1998), when observations are above 1000 the K.S test becomes highly sensitive which means small deviations from normality will result in p values below .05 and thus rejecting the normality. Thus for above 1000 observations it is suggested to use graphical tests as well. Try qqPlot and hist to graphically see if data is normal or not.