Shapiro-Wilk Test
The Shapiro-Wilk Test tests the null hypothesis that a sample $\it{X}$ came for a normally distributed population.
$$W = \frac{\big(\sum_{i = 1}^n a_i x_{(i)}\big)^2}{\sum_{i = 1}^n (x_i - \bar{x})^2}$$
Where:
- $x_{(i)}$: the $i$-th order statistic, i.e. the $i$-th-smallest number in the sample
- $\bar{x}$: the sample mean
Coefficients $a_i$ are given by:
$$(a_1, \dots, a_n) = \frac{m^T V^{-1}}{C}$$
$$C = ||V^{-1}m|| = (m^T V^{-1} V^{-1} m)^{1/2}$$
Where:
- $m$: vector of expected values of the order statistics of independent and identically distributed random variables sampled from the standard normal distribution.
- $V$: covariance matrix of those normal order statistics.
If the $p$-value is less than the chosen alpha level, usually $0.05$, then the null hypothesis is rejected, i.e. the data tested is not normally distributed.
References
- Shapiro–Wilk test. Wikipedia.
Resources