28.22 Example, test for normality, medium sample

  • Test a medium random normal distribution
rn <- rnorm(20,mean=0, sd=1)
shapiro.test(rn)
## 
##  Shapiro-Wilk normality test
## 
## data:  rn
## W = 1, p-value = 0.7
  • Test a medium random uniform distribution
ru <- runif(20, min=-4, max=4)
shapiro.test(ru)
## 
##  Shapiro-Wilk normality test
## 
## data:  ru
## W = 0.9, p-value = 0.3