shapiro.test(flower$height[flower$nitrogen =="low"])
##
## Shapiro-Wilk normality test
##
## data: flower$height[flower$nitrogen == "low"]
## W = 0.946, p-value = 0.1109
shapiro.test(flower$height[flower$nitrogen =="medium"])
##
## Shapiro-Wilk normality test
##
## data: flower$height[flower$nitrogen == "medium"]
## W = 0.9519, p-value = 0.1631
shapiro.test(flower$height[flower$nitrogen =="high"])
##
## Shapiro-Wilk normality test
##
## data: flower$height[flower$nitrogen == "high"]
## W = 0.97333, p-value = 0.5958
- Normality can be confirmed using Shapiro-Wilk’s Test, which directly compares a set of data points to a normal distribution and quantifies how close they are to normal distribution via a p-value. P > 0.05 indicates that they are normally distributed, which is the case for all three groups [3].