The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class: none
Declaration: [1] function PerformKSNormalityTest (Data: TVector; IsSorted: boolean): double;
[2] function 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 vector 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 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 if IsSorted is set to FALSE.

Last Update: 2023-Feb-06