Shapiro-Wilk Normality Test in R (Example) | Apply shapiro.test Function | plot & density Functions

preview_player
Показать описание
R code of this video:

x1 <- rnorm(100) # Create normally distributed vector
x2 <- runif(100) # Create uniformly distributed vector

plot(density(x1), ylim = c(0, 1.1), col = 2) # Draw data to density plot
lines(density(x2), col = 3)
legend("topleft", c("x1", "x2"), col = 2:3, lty = 1)

Follow me on Social Media:
Рекомендации по теме
join shbcf.ru