UnivariateKruskalWallisTest(IReadOnlyListDouble) Method

Performs a Kruskal-Wallis test on the given samples.

Definition

Namespace: Meta.Numerics.Statistics
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public static TestResult KruskalWallisTest(
	params IReadOnlyList<double>[] samples
)

Parameters

samples  IReadOnlyListDouble
The set of samples to compare.

Return Value

TestResult
The result of the test.

Remarks

Kruskal-Wallis tests for differences between the samples. It is a non-parametric alternative to the one-way ANOVA (OneWayAnovaTest(IReadOnlyCollectionDouble)) 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(IReadOnlyListDouble, IReadOnlyListDouble)).

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.

Exceptions

See Also