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....



FriedmanTest


Unit:SDL_statis
Class: none
Declaration: function FriedmanTest (Data: TMatrix; var Chi2Stat: double): double;

The function FriedmanTest performs a Friedman test of homogeneity of matched samples having at least 3 groups. The observed values have to be stored in the matrix Data whose rows are the observations and whose columns are the groups. A minimum number of three groups is required. The function returns the chi-square statistic in the variable parameter Chi2Stat and the corresponding p-value as the function value.

Please note that the p-value is an asymptotic value obtained from the chi square distribution. This value is not accurate for a low number of groups and/or a low number of observations. As a rule of thumb the p-value is reliable only if the product of the number of columns and the number of rows of the data matrix exceeds 40.

Hint: The function returns a negative value if the number of groups is too low (i.e. if there are less than 3 groups)



Last Update: 2023-Feb-06