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

Copyright | (c) 2009 Bryan O'Sullivan
License | BSD3
Maintainer | bos@serpentine.com
Stability | experimental
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Statistics.Types

Contents

- Confidence level
  - Accessors
  - Constructors
  - Constants and conversion to nσ
    - Normal approximation
- p-value
  - Accessors
  - Constructors
- Estimates and upper/lower limits
  - Constructors
  - Accessors
- Other

Description

Data types common used in statistics

Synopsis

- data CL a
- confidenceLevel :: Num a => CL a -> a
- significanceLevel :: CL a -> a
- mkCL :: (Ord a, Num a) => a -> CL a
- mkCLE :: (Ord a, Num a) => a -> Maybe (CL a)
- mkCLFromSignificance :: (Ord a, Num a) => a -> CL a
- mkCLFromSignificanceE :: (Ord a, Num a) => a -> Maybe (CL a)
- cl90 :: Fractional a => CL a
- cl95 :: Fractional a => CL a
- cl99 :: Fractional a => CL a
- nSigma :: Double -> PValue Double
- nSigma1 :: Double -> PValue Double
- getNSigma :: PValue Double -> Double
- getNSigma1 :: PValue Double -> Double
- data PValue a
- pValue :: PValue a -> a
- mkPValue :: (Ord a, Num a) => a -> PValue a
- mkPValueE :: (Ord a, Num a) => a -> Maybe (PValue a)
- data Estimate e a = Estimate {
  - estPoint :: !a
  - estError :: !(e a)
  }
- newtype NormalErr a = NormalErr {
  - normalError :: a
  }
- data ConfInt a = ConfInt {
  - confIntLDX :: !a
  - confIntUDX :: !a
  - confIntCL :: !(CL Double)
  }
- data UpperLimit a = UpperLimit {
  - upperLimit :: !a
  - ulConfidenceLevel :: !(CL Double)
  }
- data LowerLimit a = LowerLimit {
  - lowerLimit :: !a
  - llConfidenceLevel :: !(CL Double)
  }
- estimateNormErr :: a -> a -> Estimate NormalErr a
- (±) :: a -> a -> Estimate NormalErr a
- estimateFromInterval :: Num a => a -> (a, a) -> CL Double -> Estimate ConfInt a
- estimateFromErr :: a -> (a, a) -> CL Double -> Estimate ConfInt a
- confidenceInterval :: Num a => Estimate ConfInt a -> (a, a)
- asymErrors :: Estimate ConfInt a -> (a, a)
- class Scale e where
  - scale :: (Ord a, Num a) => a -> e a -> e a
- type Sample = Vector Double
- type WeightedSample = Vector (Double, Double)
- type Weights = Vector Double

# Confidence level

data CL a Source #

Confidence level. In context of confidence intervals it's probability of said interval covering true value of measured value. In context of statistical tests it's `1-α` where α is significance of test.

Since confidence level are usually close to 1 they are stored as `1-CL` internally. There are two smart constructors for `CL`: `mkCL` and `mkCLFromSignificance` (and corresponding variant returning `Maybe`). First creates `CL` from confidence level and second from `1 - CL` or significance level.

    >>> cl95
    mkCLFromSignificance 0.05

Prior to 0.14 confidence levels were passed to function as plain `Doubles`. Use `mkCL` to convert them to `CL`.

#### Instances

Instances details

Unbox a => Vector Vector (CL a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicUnsafeFreeze :: Mutable Vector s (CL a) -> ST s (Vector (CL a)) Source #

basicUnsafeThaw :: Vector (CL a) -> ST s (Mutable Vector s (CL a)) Source #

basicLength :: Vector (CL a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> Vector (CL a) -> Vector (CL a) Source #

basicUnsafeIndexM :: Vector (CL a) -> Int -> Box (CL a) Source #

basicUnsafeCopy :: Mutable Vector s (CL a) -> Vector (CL a) -> ST s () Source #

elemseq :: Vector (CL a) -> CL a -> b -> b Source #

Unbox a => MVector MVector (CL a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicLength :: MVector s (CL a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s (CL a) -> MVector s (CL a) Source #

basicOverlaps :: MVector s (CL a) -> MVector s (CL a) -> Bool Source #

basicUnsafeNew :: Int -> ST s (MVector s (CL a)) Source #

basicInitialize :: MVector s (CL a) -> ST s () Source #

basicUnsafeReplicate :: Int -> CL a -> ST s (MVector s (CL a)) Source #

basicUnsafeRead :: MVector s (CL a) -> Int -> ST s (CL a) Source #

basicUnsafeWrite :: MVector s (CL a) -> Int -> CL a -> ST s () Source #

basicClear :: MVector s (CL a) -> ST s () Source #

basicSet :: MVector s (CL a) -> CL a -> ST s () Source #

basicUnsafeCopy :: MVector s (CL a) -> MVector s (CL a) -> ST s () Source #

basicUnsafeMove :: MVector s (CL a) -> MVector s (CL a) -> ST s () Source #

basicUnsafeGrow :: MVector s (CL a) -> Int -> ST s (MVector s (CL a)) Source #

(FromJSON a, Num a, Ord a) => FromJSON (CL a) Source # |
Instance details Defined in Statistics.Types Methods parseJSON :: Value -> Parser (CL a) Source # parseJSONList :: Value -> Parser [CL a] Source #
ToJSON a => ToJSON (CL a) Source # |
Instance details Defined in Statistics.Types Methods toJSON :: CL a -> Value Source # toEncoding :: CL a -> Encoding Source # toJSONList :: [CL a] -> Value Source # toEncodingList :: [CL a] -> Encoding Source #
Data a => Data (CL a) Source # |

Instance details

Defined in Statistics.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CL a -> c (CL a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CL a) Source #

toConstr :: CL a -> Constr Source #

dataTypeOf :: CL a -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> CL a -> CL a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CL a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CL a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> CL a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CL a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CL a -> m (CL a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CL a -> m (CL a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CL a -> m (CL a) Source #

Generic (CL a) Source # |
Instance details Defined in Statistics.Types Associated Types type Rep (CL a) :: Type -> Type Source # Methods from :: CL a -> Rep (CL a) x Source # to :: Rep (CL a) x -> CL a Source #
(Num a, Ord a, Read a) => Read (CL a) Source # |
Instance details Defined in Statistics.Types Methods readsPrec :: Int -> ReadS (CL a) Source # readList :: ReadS [CL a] Source # readPrec :: ReadPrec (CL a) Source # readListPrec :: ReadPrec [CL a] Source #
Show a => Show (CL a) Source # |
Instance details Defined in Statistics.Types Methods showsPrec :: Int -> CL a -> ShowS Source # show :: CL a -> String Source # showList :: [CL a] -> ShowS Source #
(Binary a, Num a, Ord a) => Binary (CL a) Source # |
Instance details Defined in Statistics.Types Methods put :: CL a -> Put Source # get :: Get (CL a) Source # putList :: [CL a] -> Put Source #
NFData a => NFData (CL a) Source # |
Instance details Defined in Statistics.Types Methods rnf :: CL a -> () Source #
Eq a => Eq (CL a) Source # |
Instance details Defined in Statistics.Types Methods (==) :: CL a -> CL a -> Bool Source # (/=) :: CL a -> CL a -> Bool Source #

Ord a => Ord (CL a) Source #

    >>> cl95 > cl90
    True

Instance details Defined in Statistics.Types Methods compare :: CL a -> CL a -> Ordering Source # (<) :: CL a -> CL a -> Bool Source # (<=) :: CL a -> CL a -> Bool Source # (>) :: CL a -> CL a -> Bool Source # (>=) :: CL a -> CL a -> Bool Source # max :: CL a -> CL a -> CL a Source # min :: CL a -> CL a -> CL a Source #
Unbox a => Unbox (CL a) Source # |
Instance details Defined in Statistics.Types
newtype MVector s (CL a) Source # |
Instance details Defined in Statistics.Types newtype MVector s (CL a) = MV_CL (MVector s a)
type Rep (CL a) Source # |
Instance details Defined in Statistics.Types type Rep (CL a) = D1 ('MetaData "CL" "Statistics.Types" "statistics-0.16.2.1-EfbCvDihUgt16PhDul7t8F" 'True) (C1 ('MetaCons "CL" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (CL a) Source # |
Instance details Defined in Statistics.Types newtype Vector (CL a) = V_CL (Vector a)

## Accessors

confidenceLevel :: Num a => CL a -> a Source #

Get confidence level. This function is subject to rounding errors. If `1 - CL` is needed use `significanceLevel` instead

significanceLevel :: CL a -> a Source #

Get significance level.

## Constructors

mkCL :: (Ord a, Num a) => a -> CL a Source #

Create confidence level from probability β or probability confidence interval contain true value of estimate. Will throw exception if parameter is out of [0,1] range

    >>> mkCL 0.95    -- same as cl95
    mkCLFromSignificance 0.05

mkCLE :: (Ord a, Num a) => a -> Maybe (CL a) Source #

Same as `mkCL` but returns `Nothing` instead of error if parameter is out of [0,1] range

    >>> mkCLE 0.95    -- same as cl95
    Just (mkCLFromSignificance 0.05)

mkCLFromSignificance :: (Ord a, Num a) => a -> CL a Source #

Create confidence level from probability α or probability that confidence interval does not contain true value of estimate. Will throw exception if parameter is out of [0,1] range

    >>> mkCLFromSignificance 0.05    -- same as cl95
    mkCLFromSignificance 0.05

mkCLFromSignificanceE :: (Ord a, Num a) => a -> Maybe (CL a) Source #

Same as `mkCLFromSignificance` but returns `Nothing` instead of error if parameter is out of [0,1] range

    >>> mkCLFromSignificanceE 0.05    -- same as cl95
    Just (mkCLFromSignificance 0.05)

## Constants and conversion to nσ

cl90 :: Fractional a => CL a Source #

90% confidence level

cl95 :: Fractional a => CL a Source #

95% confidence level

cl99 :: Fractional a => CL a Source #

99% confidence level

### Normal approximation

nSigma :: Double -> PValue Double Source #

P-value expressed in sigma. This is convention widely used in experimental physics. N sigma confidence level corresponds to probability within N sigma of normal distribution.

Note that this correspondence is for normal distribution. Other distribution will have different dependency. Also experimental distribution usually only approximately normal (especially at extreme tails).

nSigma1 :: Double -> PValue Double Source #

P-value expressed in sigma for one-tail hypothesis. This correspond to probability of obtaining value less than `N·σ`.

getNSigma :: PValue Double -> Double Source #

Express confidence level in sigmas

getNSigma1 :: PValue Double -> Double Source #

Express confidence level in sigmas for one-tailed hypothesis.

# p-value

data PValue a Source #

Newtype wrapper for p-value.

#### Instances

Instances details

Unbox a => Vector Vector (PValue a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicUnsafeFreeze :: Mutable Vector s (PValue a) -> ST s (Vector (PValue a)) Source #

basicUnsafeThaw :: Vector (PValue a) -> ST s (Mutable Vector s (PValue a)) Source #

basicLength :: Vector (PValue a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> Vector (PValue a) -> Vector (PValue a) Source #

basicUnsafeIndexM :: Vector (PValue a) -> Int -> Box (PValue a) Source #

basicUnsafeCopy :: Mutable Vector s (PValue a) -> Vector (PValue a) -> ST s () Source #

elemseq :: Vector (PValue a) -> PValue a -> b -> b Source #

Unbox a => MVector MVector (PValue a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicLength :: MVector s (PValue a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s (PValue a) -> MVector s (PValue a) Source #

basicOverlaps :: MVector s (PValue a) -> MVector s (PValue a) -> Bool Source #

basicUnsafeNew :: Int -> ST s (MVector s (PValue a)) Source #

basicInitialize :: MVector s (PValue a) -> ST s () Source #

basicUnsafeReplicate :: Int -> PValue a -> ST s (MVector s (PValue a)) Source #

basicUnsafeRead :: MVector s (PValue a) -> Int -> ST s (PValue a) Source #

basicUnsafeWrite :: MVector s (PValue a) -> Int -> PValue a -> ST s () Source #

basicClear :: MVector s (PValue a) -> ST s () Source #

basicSet :: MVector s (PValue a) -> PValue a -> ST s () Source #

basicUnsafeCopy :: MVector s (PValue a) -> MVector s (PValue a) -> ST s () Source #

basicUnsafeMove :: MVector s (PValue a) -> MVector s (PValue a) -> ST s () Source #

basicUnsafeGrow :: MVector s (PValue a) -> Int -> ST s (MVector s (PValue a)) Source #

(FromJSON a, Num a, Ord a) => FromJSON (PValue a) Source # |
Instance details Defined in Statistics.Types Methods parseJSON :: Value -> Parser (PValue a) Source # parseJSONList :: Value -> Parser [PValue a] Source #
ToJSON a => ToJSON (PValue a) Source # |
Instance details Defined in Statistics.Types Methods toJSON :: PValue a -> Value Source # toEncoding :: PValue a -> Encoding Source # toJSONList :: [PValue a] -> Value Source # toEncodingList :: [PValue a] -> Encoding Source #
Data a => Data (PValue a) Source # |

Instance details

Defined in Statistics.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PValue a -> c (PValue a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (PValue a) Source #

toConstr :: PValue a -> Constr Source #

dataTypeOf :: PValue a -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> PValue a -> PValue a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PValue a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PValue a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> PValue a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PValue a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PValue a -> m (PValue a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PValue a -> m (PValue a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PValue a -> m (PValue a) Source #

Generic (PValue a) Source # |
Instance details Defined in Statistics.Types Associated Types type Rep (PValue a) :: Type -> Type Source # Methods from :: PValue a -> Rep (PValue a) x Source # to :: Rep (PValue a) x -> PValue a Source #
(Num a, Ord a, Read a) => Read (PValue a) Source # |
Instance details Defined in Statistics.Types Methods readsPrec :: Int -> ReadS (PValue a) Source # readList :: ReadS [PValue a] Source # readPrec :: ReadPrec (PValue a) Source # readListPrec :: ReadPrec [PValue a] Source #
Show a => Show (PValue a) Source # |
Instance details Defined in Statistics.Types Methods showsPrec :: Int -> PValue a -> ShowS Source # show :: PValue a -> String Source # showList :: [PValue a] -> ShowS Source #
(Binary a, Num a, Ord a) => Binary (PValue a) Source # |
Instance details Defined in Statistics.Types Methods put :: PValue a -> Put Source # get :: Get (PValue a) Source # putList :: [PValue a] -> Put Source #
NFData a => NFData (PValue a) Source # |
Instance details Defined in Statistics.Types Methods rnf :: PValue a -> () Source #
Eq a => Eq (PValue a) Source # |
Instance details Defined in Statistics.Types Methods (==) :: PValue a -> PValue a -> Bool Source # (/=) :: PValue a -> PValue a -> Bool Source #
Ord a => Ord (PValue a) Source # |
Instance details Defined in Statistics.Types Methods compare :: PValue a -> PValue a -> Ordering Source # (<) :: PValue a -> PValue a -> Bool Source # (<=) :: PValue a -> PValue a -> Bool Source # (>) :: PValue a -> PValue a -> Bool Source # (>=) :: PValue a -> PValue a -> Bool Source # max :: PValue a -> PValue a -> PValue a Source # min :: PValue a -> PValue a -> PValue a Source #
Unbox a => Unbox (PValue a) Source # |
Instance details Defined in Statistics.Types
newtype MVector s (PValue a) Source # |
Instance details Defined in Statistics.Types newtype MVector s (PValue a) = MV_PValue (MVector s a)
type Rep (PValue a) Source # |
Instance details Defined in Statistics.Types type Rep (PValue a) = D1 ('MetaData "PValue" "Statistics.Types" "statistics-0.16.2.1-EfbCvDihUgt16PhDul7t8F" 'True) (C1 ('MetaCons "PValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (PValue a) Source # |
Instance details Defined in Statistics.Types newtype Vector (PValue a) = V_PValue (Vector a)

## Accessors

pValue :: PValue a -> a Source #

Get p-value

## Constructors

mkPValue :: (Ord a, Num a) => a -> PValue a Source #

Construct PValue. Throws error if argument is out of [0,1] range.

mkPValueE :: (Ord a, Num a) => a -> Maybe (PValue a) Source #

Construct PValue. Returns `Nothing` if argument is out of [0,1] range.

# Estimates and upper/lower limits

data Estimate e a Source #

A point estimate and its confidence interval. It's parametrized by both error type `e` and value type `a`. This module provides two types of error: `NormalErr` for normally distributed errors and `ConfInt` for error with normal distribution. See their documentation for more details.

For example `144 ± 5` (assuming normality) could be expressed as

    Estimate { estPoint = 144
             , estError = NormalErr 5
             }

Or if we want to express `144 + 6 - 4` at CL95 we could write:

    Estimate { estPoint = 144
             , estError = ConfInt
                          { confIntLDX = 4
                          , confIntUDX = 6
                          , confIntCL  = cl95
                          }

Prior to statistics 0.14 `Estimate` data type used following definition:

    data Estimate = Estimate {
         estPoint           :: {-# UNPACK #-} !Double
       , estLowerBound      :: {-# UNPACK #-} !Double
       , estUpperBound      :: {-# UNPACK #-} !Double
       , estConfidenceLevel :: {-# UNPACK #-} !Double
       }

Now type `Estimate ConfInt Double` should be used instead. Function `estimateFromInterval` allow to easily construct estimate from same inputs.

Constructors

Estimate |

Fields

- estPoint :: !a

  Point estimate.

- estError :: !(e a)

  Confidence interval for estimate.

#### Instances

Instances details

(Unbox a, Unbox (e a)) => Vector Vector (Estimate e a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicUnsafeFreeze :: Mutable Vector s (Estimate e a) -> ST s (Vector (Estimate e a)) Source #

basicUnsafeThaw :: Vector (Estimate e a) -> ST s (Mutable Vector s (Estimate e a)) Source #

basicLength :: Vector (Estimate e a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> Vector (Estimate e a) -> Vector (Estimate e a) Source #

basicUnsafeIndexM :: Vector (Estimate e a) -> Int -> Box (Estimate e a) Source #

basicUnsafeCopy :: Mutable Vector s (Estimate e a) -> Vector (Estimate e a) -> ST s () Source #

elemseq :: Vector (Estimate e a) -> Estimate e a -> b -> b Source #

(Unbox a, Unbox (e a)) => MVector MVector (Estimate e a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicLength :: MVector s (Estimate e a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s (Estimate e a) -> MVector s (Estimate e a) Source #

basicOverlaps :: MVector s (Estimate e a) -> MVector s (Estimate e a) -> Bool Source #

basicUnsafeNew :: Int -> ST s (MVector s (Estimate e a)) Source #

basicInitialize :: MVector s (Estimate e a) -> ST s () Source #

basicUnsafeReplicate :: Int -> Estimate e a -> ST s (MVector s (Estimate e a)) Source #

basicUnsafeRead :: MVector s (Estimate e a) -> Int -> ST s (Estimate e a) Source #

basicUnsafeWrite :: MVector s (Estimate e a) -> Int -> Estimate e a -> ST s () Source #

basicClear :: MVector s (Estimate e a) -> ST s () Source #

basicSet :: MVector s (Estimate e a) -> Estimate e a -> ST s () Source #

basicUnsafeCopy :: MVector s (Estimate e a) -> MVector s (Estimate e a) -> ST s () Source #

basicUnsafeMove :: MVector s (Estimate e a) -> MVector s (Estimate e a) -> ST s () Source #

basicUnsafeGrow :: MVector s (Estimate e a) -> Int -> ST s (MVector s (Estimate e a)) Source #

Scale e => Scale (Estimate e) Source # |
Instance details Defined in Statistics.Types Methods scale :: (Ord a, Num a) => a -> Estimate e a -> Estimate e a Source #
(FromJSON (e a), FromJSON a) => FromJSON (Estimate e a) Source # |
Instance details Defined in Statistics.Types Methods parseJSON :: Value -> Parser (Estimate e a) Source # parseJSONList :: Value -> Parser [Estimate e a] Source #
(ToJSON (e a), ToJSON a) => ToJSON (Estimate e a) Source # |
Instance details Defined in Statistics.Types Methods toJSON :: Estimate e a -> Value Source # toEncoding :: Estimate e a -> Encoding Source # toJSONList :: [Estimate e a] -> Value Source # toEncodingList :: [Estimate e a] -> Encoding Source #
(Typeable e, Data a, Data (e a)) => Data (Estimate e a) Source # |

Instance details

Defined in Statistics.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Estimate e a -> c (Estimate e a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Estimate e a) Source #

toConstr :: Estimate e a -> Constr Source #

dataTypeOf :: Estimate e a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Estimate e a)) Source #

dataCast2 :: Typeable t => (forall d e0. (Data d, Data e0) => c (t d e0)) -> Maybe (c (Estimate e a)) Source #

gmapT :: (forall b. Data b => b -> b) -> Estimate e a -> Estimate e a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Estimate e a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Estimate e a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Estimate e a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Estimate e a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Estimate e a -> m (Estimate e a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Estimate e a -> m (Estimate e a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Estimate e a -> m (Estimate e a) Source #

Generic (Estimate e a) Source # |
Instance details Defined in Statistics.Types Associated Types type Rep (Estimate e a) :: Type -> Type Source # Methods from :: Estimate e a -> Rep (Estimate e a) x Source # to :: Rep (Estimate e a) x -> Estimate e a Source #
(Read a, Read (e a)) => Read (Estimate e a) Source # |
Instance details Defined in Statistics.Types Methods readsPrec :: Int -> ReadS (Estimate e a) Source # readList :: ReadS [Estimate e a] Source # readPrec :: ReadPrec (Estimate e a) Source # readListPrec :: ReadPrec [Estimate e a] Source #
(Show a, Show (e a)) => Show (Estimate e a) Source # |
Instance details Defined in Statistics.Types Methods showsPrec :: Int -> Estimate e a -> ShowS Source # show :: Estimate e a -> String Source # showList :: [Estimate e a] -> ShowS Source #
(Binary (e a), Binary a) => Binary (Estimate e a) Source # |
Instance details Defined in Statistics.Types Methods put :: Estimate e a -> Put Source # get :: Get (Estimate e a) Source # putList :: [Estimate e a] -> Put Source #
(NFData (e a), NFData a) => NFData (Estimate e a) Source # |
Instance details Defined in Statistics.Types Methods rnf :: Estimate e a -> () Source #
(Eq a, Eq (e a)) => Eq (Estimate e a) Source # |
Instance details Defined in Statistics.Types Methods (==) :: Estimate e a -> Estimate e a -> Bool Source # (/=) :: Estimate e a -> Estimate e a -> Bool Source #
(Unbox a, Unbox (e a)) => Unbox (Estimate e a) Source # |
Instance details Defined in Statistics.Types
newtype MVector s (Estimate e a) Source # |
Instance details Defined in Statistics.Types newtype MVector s (Estimate e a) = MV_Estimate (MVector s (a, e a))
type Rep (Estimate e a) Source # |

Instance details

Defined in Statistics.Types

type Rep (Estimate e a) = D1 ('MetaData "Estimate" "Statistics.Types" "statistics-0.16.2.1-EfbCvDihUgt16PhDul7t8F" 'False) (C1 ('MetaCons "Estimate" 'PrefixI 'True) (S1 ('MetaSel ('Just "estPoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "estError") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (e a))))

newtype Vector (Estimate e a) Source # |
Instance details Defined in Statistics.Types newtype Vector (Estimate e a) = V_Estimate (Vector (a, e a))

newtype NormalErr a Source #

Normal errors. They are stored as 1σ errors which corresponds to 68.8% CL. Since we can recalculate them to any confidence level if needed we don't store it.

Constructors

NormalErr |

Fields

- normalError :: a

#### Instances

Instances details

Scale NormalErr Source # |
Instance details Defined in Statistics.Types Methods scale :: (Ord a, Num a) => a -> NormalErr a -> NormalErr a Source #
Unbox a => Vector Vector (NormalErr a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicUnsafeFreeze :: Mutable Vector s (NormalErr a) -> ST s (Vector (NormalErr a)) Source #

basicUnsafeThaw :: Vector (NormalErr a) -> ST s (Mutable Vector s (NormalErr a)) Source #

basicLength :: Vector (NormalErr a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> Vector (NormalErr a) -> Vector (NormalErr a) Source #

basicUnsafeIndexM :: Vector (NormalErr a) -> Int -> Box (NormalErr a) Source #

basicUnsafeCopy :: Mutable Vector s (NormalErr a) -> Vector (NormalErr a) -> ST s () Source #

elemseq :: Vector (NormalErr a) -> NormalErr a -> b -> b Source #

Unbox a => MVector MVector (NormalErr a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicLength :: MVector s (NormalErr a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s (NormalErr a) -> MVector s (NormalErr a) Source #

basicOverlaps :: MVector s (NormalErr a) -> MVector s (NormalErr a) -> Bool Source #

basicUnsafeNew :: Int -> ST s (MVector s (NormalErr a)) Source #

basicInitialize :: MVector s (NormalErr a) -> ST s () Source #

basicUnsafeReplicate :: Int -> NormalErr a -> ST s (MVector s (NormalErr a)) Source #

basicUnsafeRead :: MVector s (NormalErr a) -> Int -> ST s (NormalErr a) Source #

basicUnsafeWrite :: MVector s (NormalErr a) -> Int -> NormalErr a -> ST s () Source #

basicClear :: MVector s (NormalErr a) -> ST s () Source #

basicSet :: MVector s (NormalErr a) -> NormalErr a -> ST s () Source #

basicUnsafeCopy :: MVector s (NormalErr a) -> MVector s (NormalErr a) -> ST s () Source #

basicUnsafeMove :: MVector s (NormalErr a) -> MVector s (NormalErr a) -> ST s () Source #

basicUnsafeGrow :: MVector s (NormalErr a) -> Int -> ST s (MVector s (NormalErr a)) Source #

FromJSON a => FromJSON (NormalErr a) Source # |
Instance details Defined in Statistics.Types Methods parseJSON :: Value -> Parser (NormalErr a) Source # parseJSONList :: Value -> Parser [NormalErr a] Source #
ToJSON a => ToJSON (NormalErr a) Source # |
Instance details Defined in Statistics.Types Methods toJSON :: NormalErr a -> Value Source # toEncoding :: NormalErr a -> Encoding Source # toJSONList :: [NormalErr a] -> Value Source # toEncodingList :: [NormalErr a] -> Encoding Source #
Data a => Data (NormalErr a) Source # |

Instance details

Defined in Statistics.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NormalErr a -> c (NormalErr a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NormalErr a) Source #

toConstr :: NormalErr a -> Constr Source #

dataTypeOf :: NormalErr a -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> NormalErr a -> NormalErr a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NormalErr a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NormalErr a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> NormalErr a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NormalErr a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NormalErr a -> m (NormalErr a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NormalErr a -> m (NormalErr a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NormalErr a -> m (NormalErr a) Source #

Generic (NormalErr a) Source # |
Instance details Defined in Statistics.Types Associated Types type Rep (NormalErr a) :: Type -> Type Source # Methods from :: NormalErr a -> Rep (NormalErr a) x Source # to :: Rep (NormalErr a) x -> NormalErr a Source #
Read a => Read (NormalErr a) Source # |
Instance details Defined in Statistics.Types Methods readsPrec :: Int -> ReadS (NormalErr a) Source # readList :: ReadS [NormalErr a] Source # readPrec :: ReadPrec (NormalErr a) Source # readListPrec :: ReadPrec [NormalErr a] Source #
Show a => Show (NormalErr a) Source # |
Instance details Defined in Statistics.Types Methods showsPrec :: Int -> NormalErr a -> ShowS Source # show :: NormalErr a -> String Source # showList :: [NormalErr a] -> ShowS Source #
Binary a => Binary (NormalErr a) Source # |
Instance details Defined in Statistics.Types Methods put :: NormalErr a -> Put Source # get :: Get (NormalErr a) Source # putList :: [NormalErr a] -> Put Source #
NFData a => NFData (NormalErr a) Source # |
Instance details Defined in Statistics.Types Methods rnf :: NormalErr a -> () Source #
Eq a => Eq (NormalErr a) Source # |
Instance details Defined in Statistics.Types Methods (==) :: NormalErr a -> NormalErr a -> Bool Source # (/=) :: NormalErr a -> NormalErr a -> Bool Source #
Unbox a => Unbox (NormalErr a) Source # |
Instance details Defined in Statistics.Types
newtype MVector s (NormalErr a) Source # |
Instance details Defined in Statistics.Types newtype MVector s (NormalErr a) = MV_NormalErr (MVector s a)
type Rep (NormalErr a) Source # |
Instance details Defined in Statistics.Types type Rep (NormalErr a) = D1 ('MetaData "NormalErr" "Statistics.Types" "statistics-0.16.2.1-EfbCvDihUgt16PhDul7t8F" 'True) (C1 ('MetaCons "NormalErr" 'PrefixI 'True) (S1 ('MetaSel ('Just "normalError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (NormalErr a) Source # |
Instance details Defined in Statistics.Types newtype Vector (NormalErr a) = V_NormalErr (Vector a)

data ConfInt a Source #

Confidence interval. It assumes that confidence interval forms single interval and isn't set of disjoint intervals.

Constructors

ConfInt |

Fields

- confIntLDX :: !a

  Lower error estimate, or distance between point estimate and lower bound of confidence interval.

- confIntUDX :: !a

  Upper error estimate, or distance between point estimate and upper bound of confidence interval.

- confIntCL :: !(CL Double)

  Confidence level corresponding to given confidence interval.

#### Instances

Instances details

Scale ConfInt Source # |
Instance details Defined in Statistics.Types Methods scale :: (Ord a, Num a) => a -> ConfInt a -> ConfInt a Source #
Unbox a => Vector Vector (ConfInt a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicUnsafeFreeze :: Mutable Vector s (ConfInt a) -> ST s (Vector (ConfInt a)) Source #

basicUnsafeThaw :: Vector (ConfInt a) -> ST s (Mutable Vector s (ConfInt a)) Source #

basicLength :: Vector (ConfInt a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> Vector (ConfInt a) -> Vector (ConfInt a) Source #

basicUnsafeIndexM :: Vector (ConfInt a) -> Int -> Box (ConfInt a) Source #

basicUnsafeCopy :: Mutable Vector s (ConfInt a) -> Vector (ConfInt a) -> ST s () Source #

elemseq :: Vector (ConfInt a) -> ConfInt a -> b -> b Source #

Unbox a => MVector MVector (ConfInt a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicLength :: MVector s (ConfInt a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s (ConfInt a) -> MVector s (ConfInt a) Source #

basicOverlaps :: MVector s (ConfInt a) -> MVector s (ConfInt a) -> Bool Source #

basicUnsafeNew :: Int -> ST s (MVector s (ConfInt a)) Source #

basicInitialize :: MVector s (ConfInt a) -> ST s () Source #

basicUnsafeReplicate :: Int -> ConfInt a -> ST s (MVector s (ConfInt a)) Source #

basicUnsafeRead :: MVector s (ConfInt a) -> Int -> ST s (ConfInt a) Source #

basicUnsafeWrite :: MVector s (ConfInt a) -> Int -> ConfInt a -> ST s () Source #

basicClear :: MVector s (ConfInt a) -> ST s () Source #

basicSet :: MVector s (ConfInt a) -> ConfInt a -> ST s () Source #

basicUnsafeCopy :: MVector s (ConfInt a) -> MVector s (ConfInt a) -> ST s () Source #

basicUnsafeMove :: MVector s (ConfInt a) -> MVector s (ConfInt a) -> ST s () Source #

basicUnsafeGrow :: MVector s (ConfInt a) -> Int -> ST s (MVector s (ConfInt a)) Source #

FromJSON a => FromJSON (ConfInt a) Source # |
Instance details Defined in Statistics.Types Methods parseJSON :: Value -> Parser (ConfInt a) Source # parseJSONList :: Value -> Parser [ConfInt a] Source #
ToJSON a => ToJSON (ConfInt a) Source # |
Instance details Defined in Statistics.Types Methods toJSON :: ConfInt a -> Value Source # toEncoding :: ConfInt a -> Encoding Source # toJSONList :: [ConfInt a] -> Value Source # toEncodingList :: [ConfInt a] -> Encoding Source #
Data a => Data (ConfInt a) Source # |

Instance details

Defined in Statistics.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConfInt a -> c (ConfInt a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ConfInt a) Source #

toConstr :: ConfInt a -> Constr Source #

dataTypeOf :: ConfInt a -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> ConfInt a -> ConfInt a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConfInt a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConfInt a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ConfInt a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ConfInt a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConfInt a -> m (ConfInt a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConfInt a -> m (ConfInt a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConfInt a -> m (ConfInt a) Source #

Generic (ConfInt a) Source # |
Instance details Defined in Statistics.Types Associated Types type Rep (ConfInt a) :: Type -> Type Source # Methods from :: ConfInt a -> Rep (ConfInt a) x Source # to :: Rep (ConfInt a) x -> ConfInt a Source #
Read a => Read (ConfInt a) Source # |
Instance details Defined in Statistics.Types Methods readsPrec :: Int -> ReadS (ConfInt a) Source # readList :: ReadS [ConfInt a] Source # readPrec :: ReadPrec (ConfInt a) Source # readListPrec :: ReadPrec [ConfInt a] Source #
Show a => Show (ConfInt a) Source # |
Instance details Defined in Statistics.Types Methods showsPrec :: Int -> ConfInt a -> ShowS Source # show :: ConfInt a -> String Source # showList :: [ConfInt a] -> ShowS Source #
Binary a => Binary (ConfInt a) Source # |
Instance details Defined in Statistics.Types Methods put :: ConfInt a -> Put Source # get :: Get (ConfInt a) Source # putList :: [ConfInt a] -> Put Source #
NFData a => NFData (ConfInt a) Source # |
Instance details Defined in Statistics.Types Methods rnf :: ConfInt a -> () Source #
Eq a => Eq (ConfInt a) Source # |
Instance details Defined in Statistics.Types Methods (==) :: ConfInt a -> ConfInt a -> Bool Source # (/=) :: ConfInt a -> ConfInt a -> Bool Source #
Unbox a => Unbox (ConfInt a) Source # |
Instance details Defined in Statistics.Types
newtype MVector s (ConfInt a) Source # |
Instance details Defined in Statistics.Types newtype MVector s (ConfInt a) = MV_ConfInt (MVector s (a, a, CL Double))
type Rep (ConfInt a) Source # |

Instance details

Defined in Statistics.Types

type Rep (ConfInt a) = D1 ('MetaData "ConfInt" "Statistics.Types" "statistics-0.16.2.1-EfbCvDihUgt16PhDul7t8F" 'False) (C1 ('MetaCons "ConfInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "confIntLDX") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: (S1 ('MetaSel ('Just "confIntUDX") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "confIntCL") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CL Double)))))

newtype Vector (ConfInt a) Source # |
Instance details Defined in Statistics.Types newtype Vector (ConfInt a) = V_ConfInt (Vector (a, a, CL Double))

data UpperLimit a Source #

Upper limit. They are usually given for small non-negative values when it's not possible detect difference from zero.

Constructors

UpperLimit |

Fields

- upperLimit :: !a

  Upper limit

- ulConfidenceLevel :: !(CL Double)

  Confidence level for which limit was calculated

#### Instances

Instances details

Unbox a => Vector Vector (UpperLimit a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicUnsafeFreeze :: Mutable Vector s (UpperLimit a) -> ST s (Vector (UpperLimit a)) Source #

basicUnsafeThaw :: Vector (UpperLimit a) -> ST s (Mutable Vector s (UpperLimit a)) Source #

basicLength :: Vector (UpperLimit a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> Vector (UpperLimit a) -> Vector (UpperLimit a) Source #

basicUnsafeIndexM :: Vector (UpperLimit a) -> Int -> Box (UpperLimit a) Source #

basicUnsafeCopy :: Mutable Vector s (UpperLimit a) -> Vector (UpperLimit a) -> ST s () Source #

elemseq :: Vector (UpperLimit a) -> UpperLimit a -> b -> b Source #

Unbox a => MVector MVector (UpperLimit a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicLength :: MVector s (UpperLimit a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s (UpperLimit a) -> MVector s (UpperLimit a) Source #

basicOverlaps :: MVector s (UpperLimit a) -> MVector s (UpperLimit a) -> Bool Source #

basicUnsafeNew :: Int -> ST s (MVector s (UpperLimit a)) Source #

basicInitialize :: MVector s (UpperLimit a) -> ST s () Source #

basicUnsafeReplicate :: Int -> UpperLimit a -> ST s (MVector s (UpperLimit a)) Source #

basicUnsafeRead :: MVector s (UpperLimit a) -> Int -> ST s (UpperLimit a) Source #

basicUnsafeWrite :: MVector s (UpperLimit a) -> Int -> UpperLimit a -> ST s () Source #

basicClear :: MVector s (UpperLimit a) -> ST s () Source #

basicSet :: MVector s (UpperLimit a) -> UpperLimit a -> ST s () Source #

basicUnsafeCopy :: MVector s (UpperLimit a) -> MVector s (UpperLimit a) -> ST s () Source #

basicUnsafeMove :: MVector s (UpperLimit a) -> MVector s (UpperLimit a) -> ST s () Source #

basicUnsafeGrow :: MVector s (UpperLimit a) -> Int -> ST s (MVector s (UpperLimit a)) Source #

FromJSON a => FromJSON (UpperLimit a) Source # |
Instance details Defined in Statistics.Types Methods parseJSON :: Value -> Parser (UpperLimit a) Source # parseJSONList :: Value -> Parser [UpperLimit a] Source #
ToJSON a => ToJSON (UpperLimit a) Source # |
Instance details Defined in Statistics.Types Methods toJSON :: UpperLimit a -> Value Source # toEncoding :: UpperLimit a -> Encoding Source # toJSONList :: [UpperLimit a] -> Value Source # toEncodingList :: [UpperLimit a] -> Encoding Source #
Data a => Data (UpperLimit a) Source # |

Instance details

Defined in Statistics.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UpperLimit a -> c (UpperLimit a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UpperLimit a) Source #

toConstr :: UpperLimit a -> Constr Source #

dataTypeOf :: UpperLimit a -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> UpperLimit a -> UpperLimit a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UpperLimit a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UpperLimit a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> UpperLimit a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UpperLimit a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UpperLimit a -> m (UpperLimit a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UpperLimit a -> m (UpperLimit a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UpperLimit a -> m (UpperLimit a) Source #

Generic (UpperLimit a) Source # |
Instance details Defined in Statistics.Types Associated Types type Rep (UpperLimit a) :: Type -> Type Source # Methods from :: UpperLimit a -> Rep (UpperLimit a) x Source # to :: Rep (UpperLimit a) x -> UpperLimit a Source #
Read a => Read (UpperLimit a) Source # |
Instance details Defined in Statistics.Types Methods readsPrec :: Int -> ReadS (UpperLimit a) Source # readList :: ReadS [UpperLimit a] Source # readPrec :: ReadPrec (UpperLimit a) Source # readListPrec :: ReadPrec [UpperLimit a] Source #
Show a => Show (UpperLimit a) Source # |
Instance details Defined in Statistics.Types Methods showsPrec :: Int -> UpperLimit a -> ShowS Source # show :: UpperLimit a -> String Source # showList :: [UpperLimit a] -> ShowS Source #
Binary a => Binary (UpperLimit a) Source # |
Instance details Defined in Statistics.Types Methods put :: UpperLimit a -> Put Source # get :: Get (UpperLimit a) Source # putList :: [UpperLimit a] -> Put Source #
NFData a => NFData (UpperLimit a) Source # |
Instance details Defined in Statistics.Types Methods rnf :: UpperLimit a -> () Source #
Eq a => Eq (UpperLimit a) Source # |
Instance details Defined in Statistics.Types Methods (==) :: UpperLimit a -> UpperLimit a -> Bool Source # (/=) :: UpperLimit a -> UpperLimit a -> Bool Source #
Unbox a => Unbox (UpperLimit a) Source # |
Instance details Defined in Statistics.Types
newtype MVector s (UpperLimit a) Source # |
Instance details Defined in Statistics.Types newtype MVector s (UpperLimit a) = MV_UpperLimit (MVector s (a, CL Double))
type Rep (UpperLimit a) Source # |

Instance details

Defined in Statistics.Types

type Rep (UpperLimit a) = D1 ('MetaData "UpperLimit" "Statistics.Types" "statistics-0.16.2.1-EfbCvDihUgt16PhDul7t8F" 'False) (C1 ('MetaCons "UpperLimit" 'PrefixI 'True) (S1 ('MetaSel ('Just "upperLimit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "ulConfidenceLevel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CL Double))))

newtype Vector (UpperLimit a) Source # |
Instance details Defined in Statistics.Types newtype Vector (UpperLimit a) = V_UpperLimit (Vector (a, CL Double))

data LowerLimit a Source #

Lower limit. They are usually given for large quantities when it's not possible to measure them. For example: proton half-life

Constructors

LowerLimit |

Fields

- lowerLimit :: !a

  Lower limit

- llConfidenceLevel :: !(CL Double)

  Confidence level for which limit was calculated

#### Instances

Instances details

Unbox a => Vector Vector (LowerLimit a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicUnsafeFreeze :: Mutable Vector s (LowerLimit a) -> ST s (Vector (LowerLimit a)) Source #

basicUnsafeThaw :: Vector (LowerLimit a) -> ST s (Mutable Vector s (LowerLimit a)) Source #

basicLength :: Vector (LowerLimit a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> Vector (LowerLimit a) -> Vector (LowerLimit a) Source #

basicUnsafeIndexM :: Vector (LowerLimit a) -> Int -> Box (LowerLimit a) Source #

basicUnsafeCopy :: Mutable Vector s (LowerLimit a) -> Vector (LowerLimit a) -> ST s () Source #

elemseq :: Vector (LowerLimit a) -> LowerLimit a -> b -> b Source #

Unbox a => MVector MVector (LowerLimit a) Source # |

Instance details

Defined in Statistics.Types

Methods

basicLength :: MVector s (LowerLimit a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s (LowerLimit a) -> MVector s (LowerLimit a) Source #

basicOverlaps :: MVector s (LowerLimit a) -> MVector s (LowerLimit a) -> Bool Source #

basicUnsafeNew :: Int -> ST s (MVector s (LowerLimit a)) Source #

basicInitialize :: MVector s (LowerLimit a) -> ST s () Source #

basicUnsafeReplicate :: Int -> LowerLimit a -> ST s (MVector s (LowerLimit a)) Source #

basicUnsafeRead :: MVector s (LowerLimit a) -> Int -> ST s (LowerLimit a) Source #

basicUnsafeWrite :: MVector s (LowerLimit a) -> Int -> LowerLimit a -> ST s () Source #

basicClear :: MVector s (LowerLimit a) -> ST s () Source #

basicSet :: MVector s (LowerLimit a) -> LowerLimit a -> ST s () Source #

basicUnsafeCopy :: MVector s (LowerLimit a) -> MVector s (LowerLimit a) -> ST s () Source #

basicUnsafeMove :: MVector s (LowerLimit a) -> MVector s (LowerLimit a) -> ST s () Source #

basicUnsafeGrow :: MVector s (LowerLimit a) -> Int -> ST s (MVector s (LowerLimit a)) Source #

FromJSON a => FromJSON (LowerLimit a) Source # |
Instance details Defined in Statistics.Types Methods parseJSON :: Value -> Parser (LowerLimit a) Source # parseJSONList :: Value -> Parser [LowerLimit a] Source #
ToJSON a => ToJSON (LowerLimit a) Source # |
Instance details Defined in Statistics.Types Methods toJSON :: LowerLimit a -> Value Source # toEncoding :: LowerLimit a -> Encoding Source # toJSONList :: [LowerLimit a] -> Value Source # toEncodingList :: [LowerLimit a] -> Encoding Source #
Data a => Data (LowerLimit a) Source # |

Instance details

Defined in Statistics.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LowerLimit a -> c (LowerLimit a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LowerLimit a) Source #

toConstr :: LowerLimit a -> Constr Source #

dataTypeOf :: LowerLimit a -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> LowerLimit a -> LowerLimit a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LowerLimit a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LowerLimit a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> LowerLimit a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LowerLimit a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LowerLimit a -> m (LowerLimit a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LowerLimit a -> m (LowerLimit a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LowerLimit a -> m (LowerLimit a) Source #

Generic (LowerLimit a) Source # |
Instance details Defined in Statistics.Types Associated Types type Rep (LowerLimit a) :: Type -> Type Source # Methods from :: LowerLimit a -> Rep (LowerLimit a) x Source # to :: Rep (LowerLimit a) x -> LowerLimit a Source #
Read a => Read (LowerLimit a) Source # |
Instance details Defined in Statistics.Types Methods readsPrec :: Int -> ReadS (LowerLimit a) Source # readList :: ReadS [LowerLimit a] Source # readPrec :: ReadPrec (LowerLimit a) Source # readListPrec :: ReadPrec [LowerLimit a] Source #
Show a => Show (LowerLimit a) Source # |
Instance details Defined in Statistics.Types Methods showsPrec :: Int -> LowerLimit a -> ShowS Source # show :: LowerLimit a -> String Source # showList :: [LowerLimit a] -> ShowS Source #
Binary a => Binary (LowerLimit a) Source # |
Instance details Defined in Statistics.Types Methods put :: LowerLimit a -> Put Source # get :: Get (LowerLimit a) Source # putList :: [LowerLimit a] -> Put Source #
NFData a => NFData (LowerLimit a) Source # |
Instance details Defined in Statistics.Types Methods rnf :: LowerLimit a -> () Source #
Eq a => Eq (LowerLimit a) Source # |
Instance details Defined in Statistics.Types Methods (==) :: LowerLimit a -> LowerLimit a -> Bool Source # (/=) :: LowerLimit a -> LowerLimit a -> Bool Source #
Unbox a => Unbox (LowerLimit a) Source # |
Instance details Defined in Statistics.Types
newtype MVector s (LowerLimit a) Source # |
Instance details Defined in Statistics.Types newtype MVector s (LowerLimit a) = MV_LowerLimit (MVector s (a, CL Double))
type Rep (LowerLimit a) Source # |

Instance details

Defined in Statistics.Types

type Rep (LowerLimit a) = D1 ('MetaData "LowerLimit" "Statistics.Types" "statistics-0.16.2.1-EfbCvDihUgt16PhDul7t8F" 'False) (C1 ('MetaCons "LowerLimit" 'PrefixI 'True) (S1 ('MetaSel ('Just "lowerLimit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "llConfidenceLevel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CL Double))))

newtype Vector (LowerLimit a) Source # |
Instance details Defined in Statistics.Types newtype Vector (LowerLimit a) = V_LowerLimit (Vector (a, CL Double))

## Constructors

estimateNormErr Source #

Arguments

:: a | Point estimate
-> a | 1σ error
-> Estimate NormalErr a |

Create estimate with normal errors

(±) Source #

Arguments

:: a | Point estimate
-> a | 1σ error
-> Estimate NormalErr a |

Synonym for `estimateNormErr`

estimateFromInterval Source #

Arguments

:: Num a |
=> a | Point estimate. Should lie within interval but it's not checked.
-> (a, a) | Lower and upper bounds of interval
-> CL Double | Confidence level for interval
-> Estimate ConfInt a |

Create estimate with asymmetric error.

estimateFromErr Source #

Arguments

:: a | Central estimate
-> (a, a) | Lower and upper errors. Both should be positive but it's not checked.
-> CL Double | Confidence level for interval
-> Estimate ConfInt a |

Create estimate with asymmetric error.

## Accessors

confidenceInterval :: Num a => Estimate ConfInt a -> (a, a) Source #

Get confidence interval

asymErrors :: Estimate ConfInt a -> (a, a) Source #

Get asymmetric errors

class Scale e where Source #

Data types which could be multiplied by constant.

Methods

scale :: (Ord a, Num a) => a -> e a -> e a Source #

#### Instances

Instances details

Scale ConfInt Source # |
Instance details Defined in Statistics.Types Methods scale :: (Ord a, Num a) => a -> ConfInt a -> ConfInt a Source #
Scale NormalErr Source # |
Instance details Defined in Statistics.Types Methods scale :: (Ord a, Num a) => a -> NormalErr a -> NormalErr a Source #
Scale e => Scale (Estimate e) Source # |
Instance details Defined in Statistics.Types Methods scale :: (Ord a, Num a) => a -> Estimate e a -> Estimate e a Source #

# Other

type Sample = Vector Double Source #

Sample data.

type WeightedSample = Vector (Double, Double) Source #

Sample with weights. First element of sample is data, second is weight

type Weights = Vector Double Source #

Weights for affecting the importance of elements of a sample.