StatsShapiroWilkTest
StatsShapiroWilkTest [/Q/Z] srcWave
The StatsShapiroWilkTest computes Shapiro-Wilk statistic W and its associated P-value and stores them in V_statistic and V_prob respectively.
Flags
| /Q | No results printed in the history area. | |
| /Z | Ignores errors. | |
Details
The Shapiro-Wilk tests the null hypothesis that the population is normally distributed. If the P-value is less than the selected alpha then the null hypothesis, normality, is rejected.
The test is valid only for waves containing 3 to 5000 data points. The operation ignores any NaNs or INFs in srcWave.
Example
// Test normally distributed data
Make/O/N=(200) ggg=gnoise(5)
StatsShapiroWilkTest ggg
W=0.995697 p=0.846139 // p>alpha so accept normality
// Test uniform distribution
Make/O/N=(200) eee=enoise(5)
StatsShapiroWilkTest eee
W=0.959616 p=1.7979e-05 // p<alpha so reject normality