statistics-0.16.3.0: A library of statistical types, data, and functions

Safe Haskell | None
Language | Haskell2010

Statistics.Test.Types

Synopsis

- data Test distr = Test {
  - testSignificance :: !(PValue Double)
  - testStatistics :: !Double
  - testDistribution :: distr
  }
- isSignificant :: PValue Double -> Test d -> TestResult
- data TestResult
  - = Significant
  - | NotSignificant
- significant :: Bool -> TestResult
- data PositionTest
  - = SamplesDiffer
  - | AGreater
  - | BGreater

# Documentation

data Test distr #

Result of statistical test.

Constructors

Test |

Fields

- testSignificance :: !(PValue Double)

  Probability of getting value of test statistics at least as extreme as measured.

- testStatistics :: !Double

  Statistic used for test.

- testDistribution :: distr

  Distribution of test statistics if null hypothesis is correct.

#### Instances

Instances details

Functor Test # |
Instance details Defined in Statistics.Test.Types Methods fmap :: (a -> b) -> Test a -> Test b # (<$) :: a -> Test b -> Test a #
FromJSON d => FromJSON (Test d) # |
Instance details Defined in Statistics.Test.Types Methods parseJSON :: Value -> Parser (Test d) # parseJSONList :: Value -> Parser [Test d] # omittedField :: Maybe (Test d) #
ToJSON d => ToJSON (Test d) # |
Instance details Defined in Statistics.Test.Types Methods toJSON :: Test d -> Value # toEncoding :: Test d -> Encoding # toJSONList :: [Test d] -> Value # toEncodingList :: [Test d] -> Encoding # omitField :: Test d -> Bool #
Binary d => Binary (Test d) # |
Instance details Defined in Statistics.Test.Types Methods put :: Test d -> Put # get :: Get (Test d) # putList :: [Test d] -> Put #
NFData d => NFData (Test d) # |
Instance details Defined in Statistics.Test.Types Methods rnf :: Test d -> () #
Data distr => Data (Test distr) # |

Instance details

Defined in Statistics.Test.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Test distr -> c (Test distr) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Test distr) #

toConstr :: Test distr -> Constr #

dataTypeOf :: Test distr -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Test distr)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Test distr)) #

gmapT :: (forall b. Data b => b -> b) -> Test distr -> Test distr #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Test distr -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Test distr -> r #

gmapQ :: (forall d. Data d => d -> u) -> Test distr -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Test distr -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Test distr -> m (Test distr) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Test distr -> m (Test distr) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Test distr -> m (Test distr) #

Generic (Test distr) # |

Instance details

Defined in Statistics.Test.Types

Associated Types

type Rep (Test distr) |

Instance details

Defined in Statistics.Test.Types

type Rep (Test distr) = D1 ('MetaData "Test" "Statistics.Test.Types" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'False) (C1 ('MetaCons "Test" 'PrefixI 'True) (S1 ('MetaSel ('Just "testSignificance") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PValue Double)) :*: (S1 ('MetaSel ('Just "testStatistics") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "testDistribution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 distr))))

Methods

from :: Test distr -> Rep (Test distr) x #

to :: Rep (Test distr) x -> Test distr #

Show distr => Show (Test distr) # |
Instance details Defined in Statistics.Test.Types Methods showsPrec :: Int -> Test distr -> ShowS # show :: Test distr -> String # showList :: [Test distr] -> ShowS #
Eq distr => Eq (Test distr) # |
Instance details Defined in Statistics.Test.Types Methods (==) :: Test distr -> Test distr -> Bool # (/=) :: Test distr -> Test distr -> Bool #
Ord distr => Ord (Test distr) # |
Instance details Defined in Statistics.Test.Types Methods compare :: Test distr -> Test distr -> Ordering # (<) :: Test distr -> Test distr -> Bool # (<=) :: Test distr -> Test distr -> Bool # (>) :: Test distr -> Test distr -> Bool # (>=) :: Test distr -> Test distr -> Bool # max :: Test distr -> Test distr -> Test distr # min :: Test distr -> Test distr -> Test distr #
type Rep (Test distr) # |

Instance details

Defined in Statistics.Test.Types

type Rep (Test distr) = D1 ('MetaData "Test" "Statistics.Test.Types" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'False) (C1 ('MetaCons "Test" 'PrefixI 'True) (S1 ('MetaSel ('Just "testSignificance") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PValue Double)) :*: (S1 ('MetaSel ('Just "testStatistics") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "testDistribution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 distr))))

isSignificant :: PValue Double -> Test d -> TestResult #

Check whether test is significant for given p-value.

data TestResult #

Result of hypothesis testing

Constructors

Significant | Null hypothesis should be rejected
NotSignificant | Data is compatible with hypothesis

#### Instances

Instances details

FromJSON TestResult # |
Instance details Defined in Statistics.Test.Types Methods parseJSON :: Value -> Parser TestResult # parseJSONList :: Value -> Parser [TestResult] # omittedField :: Maybe TestResult #
ToJSON TestResult # |
Instance details Defined in Statistics.Test.Types Methods toJSON :: TestResult -> Value # toEncoding :: TestResult -> Encoding # toJSONList :: [TestResult] -> Value # toEncodingList :: [TestResult] -> Encoding # omitField :: TestResult -> Bool #
Binary TestResult # |
Instance details Defined in Statistics.Test.Types Methods put :: TestResult -> Put # get :: Get TestResult # putList :: [TestResult] -> Put #
NFData TestResult # |
Instance details Defined in Statistics.Test.Types Methods rnf :: TestResult -> () #
Data TestResult # |

Instance details

Defined in Statistics.Test.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TestResult -> c TestResult #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TestResult #

toConstr :: TestResult -> Constr #

dataTypeOf :: TestResult -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TestResult) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TestResult) #

gmapT :: (forall b. Data b => b -> b) -> TestResult -> TestResult #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TestResult -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TestResult -> r #

gmapQ :: (forall d. Data d => d -> u) -> TestResult -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TestResult -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TestResult -> m TestResult #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TestResult -> m TestResult #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TestResult -> m TestResult #

Generic TestResult # |

Instance details

Defined in Statistics.Test.Types

Associated Types

type Rep TestResult |
Instance details Defined in Statistics.Test.Types type Rep TestResult = D1 ('MetaData "TestResult" "Statistics.Test.Types" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'False) (C1 ('MetaCons "Significant" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotSignificant" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: TestResult -> Rep TestResult x #

to :: Rep TestResult x -> TestResult #

Show TestResult # |
Instance details Defined in Statistics.Test.Types Methods showsPrec :: Int -> TestResult -> ShowS # show :: TestResult -> String # showList :: [TestResult] -> ShowS #
Eq TestResult # |
Instance details Defined in Statistics.Test.Types Methods (==) :: TestResult -> TestResult -> Bool # (/=) :: TestResult -> TestResult -> Bool #
Ord TestResult # |
Instance details Defined in Statistics.Test.Types Methods compare :: TestResult -> TestResult -> Ordering # (<) :: TestResult -> TestResult -> Bool # (<=) :: TestResult -> TestResult -> Bool # (>) :: TestResult -> TestResult -> Bool # (>=) :: TestResult -> TestResult -> Bool # max :: TestResult -> TestResult -> TestResult # min :: TestResult -> TestResult -> TestResult #
type Rep TestResult # |
Instance details Defined in Statistics.Test.Types type Rep TestResult = D1 ('MetaData "TestResult" "Statistics.Test.Types" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'False) (C1 ('MetaCons "Significant" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotSignificant" 'PrefixI 'False) (U1 :: Type -> Type))

significant :: Bool -> TestResult #

significant if parameter is `True`, not significant otherwise

data PositionTest #

Test type for test which compare positional (mean,median etc.) information of samples.

Constructors

SamplesDiffer | Test whether samples differ in position. Null hypothesis is samples are not different
AGreater | Test if first sample (A) is larger than second (B). Null hypothesis is first sample is not larger than second.
BGreater | Test if second sample is larger than first.

#### Instances

Instances details

FromJSON PositionTest # |
Instance details Defined in Statistics.Test.Types Methods parseJSON :: Value -> Parser PositionTest # parseJSONList :: Value -> Parser [PositionTest] # omittedField :: Maybe PositionTest #
ToJSON PositionTest # |
Instance details Defined in Statistics.Test.Types Methods toJSON :: PositionTest -> Value # toEncoding :: PositionTest -> Encoding # toJSONList :: [PositionTest] -> Value # toEncodingList :: [PositionTest] -> Encoding # omitField :: PositionTest -> Bool #
Binary PositionTest # |
Instance details Defined in Statistics.Test.Types Methods put :: PositionTest -> Put # get :: Get PositionTest # putList :: [PositionTest] -> Put #
NFData PositionTest # |
Instance details Defined in Statistics.Test.Types Methods rnf :: PositionTest -> () #
Data PositionTest # |

Instance details

Defined in Statistics.Test.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PositionTest -> c PositionTest #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PositionTest #

toConstr :: PositionTest -> Constr #

dataTypeOf :: PositionTest -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PositionTest) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PositionTest) #

gmapT :: (forall b. Data b => b -> b) -> PositionTest -> PositionTest #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PositionTest -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PositionTest -> r #

gmapQ :: (forall d. Data d => d -> u) -> PositionTest -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PositionTest -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PositionTest -> m PositionTest #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PositionTest -> m PositionTest #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PositionTest -> m PositionTest #

Generic PositionTest # |

Instance details

Defined in Statistics.Test.Types

Associated Types

type Rep PositionTest |
Instance details Defined in Statistics.Test.Types type Rep PositionTest = D1 ('MetaData "PositionTest" "Statistics.Test.Types" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'False) (C1 ('MetaCons "SamplesDiffer" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AGreater" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BGreater" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: PositionTest -> Rep PositionTest x #

to :: Rep PositionTest x -> PositionTest #

Show PositionTest # |
Instance details Defined in Statistics.Test.Types Methods showsPrec :: Int -> PositionTest -> ShowS # show :: PositionTest -> String # showList :: [PositionTest] -> ShowS #
Eq PositionTest # |
Instance details Defined in Statistics.Test.Types Methods (==) :: PositionTest -> PositionTest -> Bool # (/=) :: PositionTest -> PositionTest -> Bool #
Ord PositionTest # |

Instance details

Defined in Statistics.Test.Types

Methods

compare :: PositionTest -> PositionTest -> Ordering #

(<) :: PositionTest -> PositionTest -> Bool #

(<=) :: PositionTest -> PositionTest -> Bool #

(>) :: PositionTest -> PositionTest -> Bool #

(>=) :: PositionTest -> PositionTest -> Bool #

max :: PositionTest -> PositionTest -> PositionTest #

min :: PositionTest -> PositionTest -> PositionTest #

type Rep PositionTest # |
Instance details Defined in Statistics.Test.Types type Rep PositionTest = D1 ('MetaData "PositionTest" "Statistics.Test.Types" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'False) (C1 ('MetaCons "SamplesDiffer" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AGreater" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BGreater" 'PrefixI 'False) (U1 :: Type -> Type)))