17.1.8.2 Algorithms (Normality Test)NormalityTest-Algorithm
Shapiro-Wilk normality test
Given a set of observations sorted into either ascending or descending order, the Shapiro Wilk W statistic is defined as:
where
is the sample mean and ai, for i=1, 2,...n are a set of mathematical weights, the values of which depend only on the sample size n.
The algorithm used by Origin is from the Applied Statistics Algorithm R94 described by Patrick Royston (1995). The function supports sample sizes of 3.
Degree of freedom (DF) is equal to the sample size.
Kolmogorov-Smirnov normality test
Origin calls a NAG function nag_1_sample_ks_test (g08cbc) , to compute the statistics. Please refer to related NAG document, for more details on the algorithm.
Lilliefors normality test
Lilliefors test is adapted from the Kolmogorov-Smirnov test, and the statistics is computed in the same way as that of Kolmogorov-Smirnov test. However, the p-value is different because Lilliefors test does not care about the mean score and variance of the data while Kolmogorov-Smirnov test does. Dallal and Wilkinson (1986) Method is used for p-value computation.
Anderson-Darling Test
Given a set of observations sorted into either ascending order, the Anderson Darling statistic is defined as
where
is the cumulative distribution function of the distribution
D'Agostino-K Squared
- Skewness statistic
- Compute the Skewness from the data
-
- Compute
- The Skewness statistic can be computed with equation below
-
- Kurtosis Statistic
- Compute the Kurtosis from the data
-
- Compute the mean and variance of
-
-
- Compute the standardized moment of
-
- Compute
-
- The Kurtosis statistic can be computed by formula below
-
- D'Agostino's Chi2 Statistic
Chen-Shapiro Test
Given a set of observations sorted into either ascending order, the Chen-Shapiro statistic is defined as
where
and is the inverse of teh standard normal distribution
|