statistics-0.16.3.0: 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 | None
Language | Haskell2010

Statistics.Distribution.Geometric

Contents

- Constructors
  - Accessors

Description

The Geometric distribution. There are two variants of distribution. First is the probability distribution of the number of Bernoulli trials needed to get one success, supported on the set 1,2... Sometimes it's referred to as the shifted geometric distribution to distinguish from another one.

Second variant is probability distribution of the number of failures before first success, defined over the set 0,1...

Synopsis

- data GeometricDistribution
- data GeometricDistribution0
- geometric :: Double -> GeometricDistribution
- geometricE :: Double -> Maybe GeometricDistribution
- geometric0 :: Double -> GeometricDistribution0
- geometric0E :: Double -> Maybe GeometricDistribution0
- gdSuccess :: GeometricDistribution -> Double
- gdSuccess0 :: GeometricDistribution0 -> Double

# Documentation

data GeometricDistribution #

Distribution over [1..]

#### Instances

Instances details

FromJSON GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods parseJSON :: Value -> Parser GeometricDistribution # parseJSONList :: Value -> Parser [GeometricDistribution] # omittedField :: Maybe GeometricDistribution #
ToJSON GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods toJSON :: GeometricDistribution -> Value # toEncoding :: GeometricDistribution -> Encoding # toJSONList :: [GeometricDistribution] -> Value # toEncodingList :: [GeometricDistribution] -> Encoding # omitField :: GeometricDistribution -> Bool #
Binary GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods put :: GeometricDistribution -> Put # get :: Get GeometricDistribution # putList :: [GeometricDistribution] -> Put #
Data GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GeometricDistribution -> c GeometricDistribution # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GeometricDistribution # toConstr :: GeometricDistribution -> Constr # dataTypeOf :: GeometricDistribution -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GeometricDistribution) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GeometricDistribution) # gmapT :: (forall b. Data b => b -> b) -> GeometricDistribution -> GeometricDistribution # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GeometricDistribution -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GeometricDistribution -> r # gmapQ :: (forall d. Data d => d -> u) -> GeometricDistribution -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GeometricDistribution -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GeometricDistribution -> m GeometricDistribution # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GeometricDistribution -> m GeometricDistribution # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GeometricDistribution -> m GeometricDistribution #
Generic GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Associated Types
type Rep GeometricDistribution |
Instance details Defined in Statistics.Distribution.Geometric type Rep GeometricDistribution = D1 ('MetaData "GeometricDistribution" "Statistics.Distribution.Geometric" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'True) (C1 ('MetaCons "GD" 'PrefixI 'True) (S1 ('MetaSel ('Just "gdSuccess") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))
Methods from :: GeometricDistribution -> Rep GeometricDistribution x # to :: Rep GeometricDistribution x -> GeometricDistribution #
Read GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods readsPrec :: Int -> ReadS GeometricDistribution # readList :: ReadS [GeometricDistribution] # readPrec :: ReadPrec GeometricDistribution # readListPrec :: ReadPrec [GeometricDistribution] #
Show GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods showsPrec :: Int -> GeometricDistribution -> ShowS # show :: GeometricDistribution -> String # showList :: [GeometricDistribution] -> ShowS #
Eq GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods (==) :: GeometricDistribution -> GeometricDistribution -> Bool # (/=) :: GeometricDistribution -> GeometricDistribution -> Bool #
ContGen GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods genContVar :: StatefulGen g m => GeometricDistribution -> g -> m Double #
DiscreteDistr GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods probability :: GeometricDistribution -> Int -> Double # logProbability :: GeometricDistribution -> Int -> Double #
DiscreteGen GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods genDiscreteVar :: StatefulGen g m => GeometricDistribution -> g -> m Int #
Distribution GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods cumulative :: GeometricDistribution -> Double -> Double # complCumulative :: GeometricDistribution -> Double -> Double #
Entropy GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods entropy :: GeometricDistribution -> Double #
MaybeEntropy GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods maybeEntropy :: GeometricDistribution -> Maybe Double #
MaybeMean GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods maybeMean :: GeometricDistribution -> Maybe Double #
MaybeVariance GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods maybeVariance :: GeometricDistribution -> Maybe Double # maybeStdDev :: GeometricDistribution -> Maybe Double #
Mean GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods mean :: GeometricDistribution -> Double #
Variance GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric Methods variance :: GeometricDistribution -> Double # stdDev :: GeometricDistribution -> Double #
type Rep GeometricDistribution # |
Instance details Defined in Statistics.Distribution.Geometric type Rep GeometricDistribution = D1 ('MetaData "GeometricDistribution" "Statistics.Distribution.Geometric" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'True) (C1 ('MetaCons "GD" 'PrefixI 'True) (S1 ('MetaSel ('Just "gdSuccess") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))

data GeometricDistribution0 #

Distribution over [0..]

#### Instances

Instances details

FromJSON GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods parseJSON :: Value -> Parser GeometricDistribution0 # parseJSONList :: Value -> Parser [GeometricDistribution0] # omittedField :: Maybe GeometricDistribution0 #
ToJSON GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods toJSON :: GeometricDistribution0 -> Value # toEncoding :: GeometricDistribution0 -> Encoding # toJSONList :: [GeometricDistribution0] -> Value # toEncodingList :: [GeometricDistribution0] -> Encoding # omitField :: GeometricDistribution0 -> Bool #
Binary GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods put :: GeometricDistribution0 -> Put # get :: Get GeometricDistribution0 # putList :: [GeometricDistribution0] -> Put #
Data GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GeometricDistribution0 -> c GeometricDistribution0 # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GeometricDistribution0 # toConstr :: GeometricDistribution0 -> Constr # dataTypeOf :: GeometricDistribution0 -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GeometricDistribution0) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GeometricDistribution0) # gmapT :: (forall b. Data b => b -> b) -> GeometricDistribution0 -> GeometricDistribution0 # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GeometricDistribution0 -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GeometricDistribution0 -> r # gmapQ :: (forall d. Data d => d -> u) -> GeometricDistribution0 -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GeometricDistribution0 -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GeometricDistribution0 -> m GeometricDistribution0 # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GeometricDistribution0 -> m GeometricDistribution0 # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GeometricDistribution0 -> m GeometricDistribution0 #
Generic GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Associated Types
type Rep GeometricDistribution0 |
Instance details Defined in Statistics.Distribution.Geometric type Rep GeometricDistribution0 = D1 ('MetaData "GeometricDistribution0" "Statistics.Distribution.Geometric" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'True) (C1 ('MetaCons "GD0" 'PrefixI 'True) (S1 ('MetaSel ('Just "gdSuccess0") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))
Methods from :: GeometricDistribution0 -> Rep GeometricDistribution0 x # to :: Rep GeometricDistribution0 x -> GeometricDistribution0 #
Read GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods readsPrec :: Int -> ReadS GeometricDistribution0 # readList :: ReadS [GeometricDistribution0] # readPrec :: ReadPrec GeometricDistribution0 # readListPrec :: ReadPrec [GeometricDistribution0] #
Show GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods showsPrec :: Int -> GeometricDistribution0 -> ShowS # show :: GeometricDistribution0 -> String # showList :: [GeometricDistribution0] -> ShowS #
Eq GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods (==) :: GeometricDistribution0 -> GeometricDistribution0 -> Bool # (/=) :: GeometricDistribution0 -> GeometricDistribution0 -> Bool #
ContGen GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods genContVar :: StatefulGen g m => GeometricDistribution0 -> g -> m Double #
DiscreteDistr GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods probability :: GeometricDistribution0 -> Int -> Double # logProbability :: GeometricDistribution0 -> Int -> Double #
DiscreteGen GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods genDiscreteVar :: StatefulGen g m => GeometricDistribution0 -> g -> m Int #
Distribution GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods cumulative :: GeometricDistribution0 -> Double -> Double # complCumulative :: GeometricDistribution0 -> Double -> Double #
Entropy GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods entropy :: GeometricDistribution0 -> Double #
MaybeEntropy GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods maybeEntropy :: GeometricDistribution0 -> Maybe Double #
MaybeMean GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods maybeMean :: GeometricDistribution0 -> Maybe Double #
MaybeVariance GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods maybeVariance :: GeometricDistribution0 -> Maybe Double # maybeStdDev :: GeometricDistribution0 -> Maybe Double #
Mean GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods mean :: GeometricDistribution0 -> Double #
Variance GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric Methods variance :: GeometricDistribution0 -> Double # stdDev :: GeometricDistribution0 -> Double #
type Rep GeometricDistribution0 # |
Instance details Defined in Statistics.Distribution.Geometric type Rep GeometricDistribution0 = D1 ('MetaData "GeometricDistribution0" "Statistics.Distribution.Geometric" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'True) (C1 ('MetaCons "GD0" 'PrefixI 'True) (S1 ('MetaSel ('Just "gdSuccess0") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))

# Constructors

geometric #

Arguments

:: Double | Success rate
-> GeometricDistribution |

Create geometric distribution.

geometricE #

Arguments

:: Double | Success rate
-> Maybe GeometricDistribution |

Create geometric distribution.

geometric0 #

Arguments

:: Double | Success rate
-> GeometricDistribution0 |

Create geometric distribution.

geometric0E #

Arguments

:: Double | Success rate
-> Maybe GeometricDistribution0 |

Create geometric distribution.

## Accessors

gdSuccess :: GeometricDistribution -> Double #

gdSuccess0 :: GeometricDistribution0 -> Double #