| Copyright | (c) Praneya Kumar Alexey Khudyakov 2025 |
|---|---|
| License | BSD-3-Clause |
| Safe Haskell | None |
| Language | Haskell2010 |
Statistics.Test.Bartlett
Description
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 VU>>>import 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})
Synopsis
- bartlettTest :: Vector v Double => [v Double] -> Either String (Test ChiSquared)
- data ChiSquared
- chiSquared :: Int -> ChiSquared
Documentation
bartlettTest :: Vector v Double => [v Double] -> Either String (Test ChiSquared) Source #
Perform Bartlett's test for equal variances. The input is a list of vectors, where each vector represents a group of observations.
data ChiSquared Source #
Chi-squared distribution
Instances
chiSquared :: Int -> ChiSquared Source #
Construct chi-squared distribution. Number of degrees of freedom must be positive.