Perform Bartlett's test for equal variances. The input is a list of vectors, where each vector represents a group of observations.
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
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
- Packagestatistics-0.16.5.0
- Exports4
- LanguageHaskell2010
- LicenceBSD-2-Clause
- SourceBartlett.hs
Construct chi-squared distribution. Number of degrees of freedom must be positive.
Chi-squared distribution
Instances18Eq, Data, Read, Show, Generic, Binary, …
Eq ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredData ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredRead ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredShow ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredGeneric ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredBinary ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredFromJSON ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredToJSON ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredContDistr ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredContGen ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredDistribution ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredEntropy ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredMaybeEntropy ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredMaybeMean ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredMaybeVariance ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredMean ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredVariance ChiSquaredDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquaredtype Rep ChiSquared = D1 ('MetaDataDefined in statistics-0.16.5.0 · Statistics.Distribution.ChiSquared"ChiSquared"
"Statistics.Distribution.ChiSquared"
"statistics-0.16.5.0-Jp8k9m0cc4Q2AQ6KmSo0la"
'True) (C1 ('MetaCons"ChiSquared"
'PrefixI 'True) (S1 ('MetaSel ('Just"chiSquaredNDF"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))
Get number of degrees of freedom