DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


PerformKSNormalityTest

Declaration: PerformKSNormalityTest (Data: TDoubleArray; IsSorted: boolean): double;
The function PerformKSNormalityTest performs a test for normality according to Kolmogorov and Smirnov. The data to be tested is contained in the array Data. The parameter IsSorted should be set to TRUE if the values in Data are already sorted in ascending order (this speeds up calculation for long data vectors).

The function returns the KS test statistic which can be compared to the critical limit calculated by KSQuantile.

Please note that the KS-test compares the data to be tested to the standard normal distribution (with mean=0.0 and std.dev.=1.0). If you want to test for a normal distribution of any mean or standard deviation you should use Lilliefors' test (function PerformLillieforsTest).

Hint: The routine PerformKSNormalityTest changes the data array if IsSorted is set to FALSE.