1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
{-# LANGUAGE DeriveDataTypeable #-}
module Statistics.Test.Types (
TestType(..)
, TestResult(..)
, significant
) where
import Data.Typeable (Typeable)
-- | Test type. Exact meaning depends on a specific test. But
-- generally it's tested whether some statistics is too big (small)
-- for 'OneTailed' or whether it too big or too small for 'TwoTailed'
data TestType = OneTailed
| TwoTailed
deriving (Eq,Ord,Show,Typeable)
-- | Result of hypothesis testing
data TestResult = Significant -- ^ Null hypothesis should be rejected
| NotSignificant -- ^ Data is compatible with hypothesis
deriving (Eq,Ord,Show,Typeable)
-- | Significant if parameter is 'True', not significant otherwiser
significant :: Bool -> TestResult
significant True = Significant
significant False = NotSignificant
{-# INLINE significant #-}
|