au.id.cxd.math.probability.analysis
Compute the critical value of the test statistic.
Compute the critical value of the test statistic.
Returns a tuple (critical value x p value)
approximate the mean of ith order statistics for quantiles 1:n
normal distribution.
the ordered function.
Compute the shapiro francia statistic and the corresponding pvalue
Compute the shapiro francia statistic and the corresponding pvalue
tuple of (critical value x p value)
Compute the shapiro wilks statistic and corresponding pvalue
Compute the shapiro wilks statistic and corresponding pvalue
tuple of (critival value x p value)
Shapiro Wilks Univariate test for normality
https://en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test
See: https://ww2.mathworks.cn/matlabcentral/mlc-downloads/downloads/submissions/13964/versions/2/previews/swtest.m/index.html
as well as: https://github.com/wch/r-source/blob/trunk/src/library/stats/src/swilk.c
Both reference the AS R94 article on the shapiro wilk normality test. The R source version swilk.c is converted from the fortran implementation of that algorithm. The matlab source being a DSL is much easier to read through. However in both cases the coefficients of the polynomials are provided in tables and these are used in the expansion when calculating the a_i coefficients in the statistic.
In order to provide an implementation, the same constant coefficients will be used. However simplification of the C version is attempted with heavy influence from the approach taken in matlab.