Univariate.KruskalWallisTest Method (IReadOnlyList<Double>[]) |
Namespace: Meta.Numerics.Statistics
Exception | Condition |
---|---|
ArgumentNullException | samples is null. |
Kruskal-Wallis tests for differences between the samples. It is a non-parametric alternative to the one-way ANOVA (OneWayAnovaTest(IReadOnlyCollection<Double>[])) which is more appropriate when the data far from normally distributed.
The test is essentially a one-way ANOVA performed on the ranks of sample values instead of the sample values themselves.
A Kruskal-Wallis test on two samples is equivalent to a Mann-Whitney test (see MannWhitneyTest(IReadOnlyList<Double>, IReadOnlyList<Double>)).
As with a normal ANOVA, it is not appropriate to bin a continuous independent variable in order to form groups for a Kruskal-Wallis test. Kruskal-Wallis addresses the non-normality of the dependent variable, not the non-discreteness of the independent variable.