A normal distribution is commonly used at a wide scale in scientific and statistical operations. As per the central limit theorem, as sample size increases, the sample distribution approaches a normal distribution. The normal distribution is well known and easy to use. In most cases, it is recommended to confirm the normality of data, especially in parametric methods, assuming that the data is Gaussian-distributed. There are lots of normality tests that exist in the literature such as the Shapiro-Wilk test, the Anderson-Darling test, and the D'Agostino-Pearson test. The scipy.stats package offers most of the tests for normality.
In this section, we will learn how to apply normality tests on data. We are using three samples of small-, medium-, and large-sized random data. Let's generate the data samples for all three samples using the normal() function, as follows:
# Import required library
import numpy as np
# create small, medium, and large...