shapiro.test tests the null hypothesis that the samples come from a normal distribution, vis-Ã -vis the alternative hypothesis, that the samples do not come from a normal distribution. Let's understand this in detail by executing the following command:
> ?shapiro.test
The R help page will be visible to users as follows:
![](https://static.packt-cdn.com/products/9781789804379/graphics/assets/680e2d58-f5d8-40b7-91d0-4a8fb3f45f3b.png)
We can see that it takes an argument of a numeric vector of data values from a specific range. Since we have implemented a data frame, it is mandatory to pass the desired column as input to this function. Consider creating a shapiro.test analysis for a balance attribute, as this is considered a critical attribute:
> shapiro.test(bank$balance[1:10])
Shapiro-Wilk normality test
data: bank$balance[1:10]
W = 0.80236, p-value = 0.01549
> shapiro.test(bank$balance[1:4000])
Shapiro-Wilk normality test
data: bank$balance[1:4000]
W = 0...