Label

Books (1) CARTO (3) Fun (21) GBDX (1) geoserver (1) GIS (57) greed (4) memo (4) movie (1) music (2) python (4) R (12) statistics (10) study (20) swim (5) tools (19) Ubuntu (7)

2010/05/19

Normality test

How to run normality test with R.
if the sample size is small (n < 2,000), run Shapiro-Wilk test

shapiro.test(data)

otherwise (n > 2,000), run Kolmogorov–Smirnov test

ks.test(data,"pnorm",mean=mean(data),sd=sd(data))


either way, if the output exceeds the level of significance (p), the data set can be considered as normal distribution.