Normality Testing validation
Free normality and lognormality testing for environmental data: Shapiro-Wilk, Lilliefors and Anderson-Darling with a plain English conclusion.
- Scenarios
- 4
- Values agreeing
- 34
- Values differing
- 4
- Validated against
- R EnvStats / nortest, USEPA ProUCL
Shapiro-Wilk follows Royston's AS R94, the algorithm R implements, and agrees with R to twelve decimal places on every scenario including the smallest sample the test accepts. Lilliefors is compared against both R and ProUCL and agrees with both to eleven decimal places. ProUCL's Shapiro-Wilk statistic is not AS R94 and differs in the fourth decimal place.
Scenarios
- Twelve results that should pass all three normality testsTypical use
- Seven results - the smallest sample Shapiro-Wilk will accept hereBoundary case
- Strongly lognormal data tested as normal - all three tests should rejectBoundary case
- The same lognormal data tested as lognormal - all three tests should acceptBoundary case
Twelve results that should pass all three normality tests
Typical useInput
12 values
| value |
|---|
| 9.8 |
| 10.4 |
| 11.2 |
| 9.1 |
| 10.8 |
| 12 |
| 8.7 |
| 10.1 |
| 11.6 |
| 9.5 |
| 10.9 |
| 10.3 |
Settings: distribution = normal, significance = 0.05
Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)
| Value | R EnvStats / nortest | EnviroAutomate | Difference | Agreement band | Verdict |
|---|---|---|---|---|---|
| Sample size (n) n | 12 | 12 | 0 | exact match | Agree |
| Shapiro-Wilk statistic shapiro-wilk.statistic | 0.9877166594954792 | 0.9877166594954789 | 2.22e-16 | within 0.000001 relative | Agree |
| Shapiro-Wilk p-value shapiro-wilk.pValue | 0.9989842778947124 | 0.9989842778947541 | 4.16e-14 | within 0.000001 relative | Agree |
| Anderson-Darling statistic anderson-darling.statistic | 0.10112276219740313 | 0.10112276218827751 | 9.13e-12 | within 0.000001 relative | Agree |
| Anderson-Darling p-value anderson-darling.pValue | 0.9958979358533097 | 0.9958979358554019 | 2.09e-12 | within 0.000001 relative | Agree |
| Lilliefors statistic lilliefors.statistic | 0.08509703332709717 | 0.08509703332709717 | 0 | within 0.000001 relative | Agree |
| Lilliefors p-value lilliefors.pValue | 0.9993297167928026 | 0.9993297167928026 | 0 | within 0.000001 relative | Agree |
Against USEPA ProUCL (ProUCL 5.2.0)
| Value | USEPA ProUCL | EnviroAutomate | Difference | Agreement band | Verdict |
|---|---|---|---|---|---|
| Sample size (n) n | 12 | 12 | 0 | exact match | Agree |
| Shapiro-Wilk statistic shapiro-wilk.statistic | 0.9876275713778322 | 0.9877166594954789 | 8.91e-5 | within 0.000001 relative | Differs |
| Why these differ: ProUCL's Shapiro-Wilk W is not Royston's AS R94. The two agree to about four decimal places on every scenario here, which is far too close to be a different test and far too far apart to be the same arithmetic. This toolkit implements AS R94, the algorithm R's shapiro.test implements, and R agrees with it to twelve decimal places. Lilliefors, computed by both tools on the same data, agrees to eleven decimal places - so this is specific to Shapiro-Wilk rather than a difference in how the data reaches the test. The toolkit's value is kept because the published algorithm is the one a reviewer can check. | |||||
| Lilliefors statistic lilliefors.statistic | 0.0850970333252784 | 0.08509703332709717 | 1.82e-12 | within 0.000001 relative | Agree |
Seven results - the smallest sample Shapiro-Wilk will accept here
Boundary caseInput
7 values
| value |
|---|
| 9.8 |
| 10.4 |
| 11.2 |
| 9.1 |
| 10.8 |
| 12 |
| 8.7 |
Settings: distribution = normal, significance = 0.05
Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)
| Value | R EnvStats / nortest | EnviroAutomate | Difference | Agreement band | Verdict |
|---|---|---|---|---|---|
| Sample size (n) n | 7 | 7 | 0 | exact match | Agree |
| Shapiro-Wilk statistic shapiro-wilk.statistic | 0.9782435696223276 | 0.9782435696223271 | 5.55e-16 | within 0.000001 relative | Agree |
| Shapiro-Wilk p-value shapiro-wilk.pValue | 0.9505867968710258 | 0.9505867968689353 | 2.09e-12 | within 0.000001 relative | Agree |
| Lilliefors statistic lilliefors.statistic | 0.1303582535573621 | 0.13035825354413028 | 1.32e-11 | within 0.000001 relative | Agree |
| Lilliefors p-value lilliefors.pValue | 0.9744044736843323 | 0.9744044737140527 | 2.97e-11 | within 0.000001 relative | Agree |
Against USEPA ProUCL (ProUCL 5.2.0)
| Value | USEPA ProUCL | EnviroAutomate | Difference | Agreement band | Verdict |
|---|---|---|---|---|---|
| Sample size (n) n | 7 | 7 | 0 | exact match | Agree |
| Shapiro-Wilk statistic shapiro-wilk.statistic | 0.978090075704838 | 0.9782435696223271 | 0.000153 | within 0.000001 relative | Differs |
| Why these differ: ProUCL's Shapiro-Wilk W is not Royston's AS R94. The two agree to about four decimal places on every scenario here, which is far too close to be a different test and far too far apart to be the same arithmetic. This toolkit implements AS R94, the algorithm R's shapiro.test implements, and R agrees with it to twelve decimal places. Lilliefors, computed by both tools on the same data, agrees to eleven decimal places - so this is specific to Shapiro-Wilk rather than a difference in how the data reaches the test. The toolkit's value is kept because the published algorithm is the one a reviewer can check. | |||||
| Lilliefors statistic lilliefors.statistic | 0.13035825356082664 | 0.13035825354413028 | 1.67e-11 | within 0.000001 relative | Agree |
Strongly lognormal data tested as normal - all three tests should reject
Boundary caseInput
15 values
| value |
|---|
| 0.8 |
| 1.1 |
| 1.3 |
| 1.6 |
| 1.9 |
| 2.4 |
| 3.1 |
| 4.6 |
| 8.2 |
| 19.7 |
| 41.5 |
| 0.9 |
| 1.2 |
| 2 |
| 2.8 |
Settings: distribution = normal, significance = 0.05
Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)
| Value | R EnvStats / nortest | EnviroAutomate | Difference | Agreement band | Verdict |
|---|---|---|---|---|---|
| Sample size (n) n | 15 | 15 | 0 | exact match | Agree |
| Shapiro-Wilk statistic shapiro-wilk.statistic | 0.5406397608704367 | 0.5406397608704372 | 4.44e-16 | within 0.000001 relative | Agree |
| Shapiro-Wilk p-value shapiro-wilk.pValue | 0.00000762701128323768 | 0.00000762701128387278 | 6.35e-16 | within 0.000001 relative | Agree |
| Anderson-Darling statistic anderson-darling.statistic | 3.0770128694635175 | 3.077012869458652 | 4.87e-12 | within 0.000001 relative | Agree |
| Anderson-Darling p-value anderson-darling.pValue | 1.02146118007462e-7 | 1.021461180102423e-7 | 2.78e-18 | within 0.000001 relative | Agree |
| Lilliefors statistic lilliefors.statistic | 0.35864936201731257 | 0.3586493620173125 | 5.55e-17 | within 0.000001 relative | Agree |
| Lilliefors p-value lilliefors.pValue | 0.000012801724290872 | 0.0000128017242908721 | 1.15e-19 | within 0.000001 relative | Agree |
Against USEPA ProUCL (ProUCL 5.2.0)
| Value | USEPA ProUCL | EnviroAutomate | Difference | Agreement band | Verdict |
|---|---|---|---|---|---|
| Sample size (n) n | 15 | 15 | 0 | exact match | Agree |
| Shapiro-Wilk statistic shapiro-wilk.statistic | 0.5405763908484948 | 0.5406397608704372 | 6.34e-5 | within 0.000001 relative | Differs |
| Why these differ: ProUCL's Shapiro-Wilk W is not Royston's AS R94. The two agree to about four decimal places on every scenario here, which is far too close to be a different test and far too far apart to be the same arithmetic. This toolkit implements AS R94, the algorithm R's shapiro.test implements, and R agrees with it to twelve decimal places. Lilliefors, computed by both tools on the same data, agrees to eleven decimal places - so this is specific to Shapiro-Wilk rather than a difference in how the data reaches the test. The toolkit's value is kept because the published algorithm is the one a reviewer can check. | |||||
| Lilliefors statistic lilliefors.statistic | 0.35864936202126735 | 0.3586493620173125 | 3.95e-12 | within 0.000001 relative | Agree |
The same lognormal data tested as lognormal - all three tests should accept
Boundary caseInput
15 values
| value |
|---|
| 0.8 |
| 1.1 |
| 1.3 |
| 1.6 |
| 1.9 |
| 2.4 |
| 3.1 |
| 4.6 |
| 8.2 |
| 19.7 |
| 41.5 |
| 0.9 |
| 1.2 |
| 2 |
| 2.8 |
Settings: distribution = lognormal, significance = 0.05
Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)
| Value | R EnvStats / nortest | EnviroAutomate | Difference | Agreement band | Verdict |
|---|---|---|---|---|---|
| Sample size (n) n | 15 | 15 | 0 | exact match | Agree |
| Shapiro-Wilk statistic shapiro-wilk.statistic | 0.8759988168819723 | 0.8759988168819723 | 0 | within 0.000001 relative | Agree |
| Shapiro-Wilk p-value shapiro-wilk.pValue | 0.04136906570210884 | 0.041369065703830366 | 1.72e-12 | within 0.000001 relative | Agree |
| Anderson-Darling statistic anderson-darling.statistic | 0.7422084728133775 | 0.7422084728459448 | 3.26e-11 | within 0.000001 relative | Agree |
| Anderson-Darling p-value anderson-darling.pValue | 0.053219951447383104 | 0.053219951437535926 | 9.85e-12 | within 0.000001 relative | Agree |
| Lilliefors statistic lilliefors.statistic | 0.1964173043115256 | 0.1964173043115256 | 0 | within 0.000001 relative | Agree |
| Lilliefors p-value lilliefors.pValue | 0.12368025963488627 | 0.12368025963489337 | 7.11e-15 | within 0.000001 relative | Agree |
Against USEPA ProUCL (ProUCL 5.2.0)
| Value | USEPA ProUCL | EnviroAutomate | Difference | Agreement band | Verdict |
|---|---|---|---|---|---|
| Sample size (n) n | 15 | 15 | 0 | exact match | Agree |
| Shapiro-Wilk statistic shapiro-wilk.statistic | 0.8759214370204856 | 0.8759988168819723 | 7.74e-5 | within 0.000001 relative | Differs |
| Why these differ: ProUCL's Shapiro-Wilk W is not Royston's AS R94. The two agree to about four decimal places on every scenario here, which is far too close to be a different test and far too far apart to be the same arithmetic. This toolkit implements AS R94, the algorithm R's shapiro.test implements, and R agrees with it to twelve decimal places. Lilliefors, computed by both tools on the same data, agrees to eleven decimal places - so this is specific to Shapiro-Wilk rather than a difference in how the data reaches the test. The toolkit's value is kept because the published algorithm is the one a reviewer can check. | |||||
| Lilliefors statistic lilliefors.statistic | 0.19641730430820817 | 0.1964173043115256 | 3.32e-12 | within 0.000001 relative | Agree |
Evidence generated 2026-08-26 from a full comparison run against the versions named above.
