HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Modulestatistics-0.16.5.0Haskell2010

Statistics.Test.KruskalWallis

Contents
  1. Kruskal-Wallis test
  2. Building blocks
Synopsis

Kruskal-Wallis test

valuekruskalWallisTest :: (Ord a, Unbox a) => [Vector a] -> Maybe (Test ())

Perform Kruskal-Wallis Test for the given samples and required significance. For additional information check kruskalWallis. This is just a helper function.

It uses Chi-Squared distribution for approximation as long as the sizes are larger than 5. Otherwise the test returns Nothing.

Building blocks

valuekruskalWallisRank :: (Unbox a, Ord a) => [Vector a] -> [Vector Double]

Kruskal-Wallis ranking.

All values are replaced by the absolute rank in the combined samples.

The samples and values need not to be ordered but the values in the result are ordered. Assigned ranks (ties are given their average rank).

valuekruskalWallis :: (Unbox a, Ord a) => [Vector a] -> Double

The Kruskal-Wallis Test.

In textbooks the output value is usually represented by K or H. This function already does the ranking.