HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulestatistics-0.16.5.0Haskell2010

Statistics.Test.Bartlett

Bartlett's test is used to check that multiple groups of observations come from distributions with equal variances. This test assumes that samples come from normal distribution. If this is not the case it may simple test for non-normality and Levene's (Statistics.Test.Levene) is preferred

Example3 expressions
import qualified Data.Vector.Unboxed as VUimport Statistics.Test.Bartlett:{let a = VU.fromList [8.88, 9.12, 9.04, 8.98, 9.00, 9.08, 9.01, 8.85, 9.06, 8.99]    b = VU.fromList [8.88, 8.95, 9.29, 9.44, 9.15, 9.58, 8.36, 9.18, 8.67, 9.05]    c = VU.fromList [8.95, 9.12, 8.95, 8.85, 9.03, 8.84, 9.07, 8.98, 8.86, 8.98]in bartlettTest [a,b,c]:}Right (Test {testSignificance = mkPValue 1.1254782518843598e-5, testStatistics = 22.789434813726768, testDistribution = chiSquared 2})
  • 1 type
  • 3 values
valuechiSquared :: Int -> ChiSquared
#

Construct chi-squared distribution. Number of degrees of freedom must be positive.

newtypenewtype ChiSquared
#

Chi-squared distribution

Instances18Eq, Data, Read, Show, Generic, Binary, …