Statistics.Distribution.Geometric

statistics-0.13.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 | Haskell98

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
- geometric0 :: Double -> GeometricDistribution0
- gdSuccess :: GeometricDistribution -> Double
- gdSuccess0 :: GeometricDistribution0 -> Double

# Documentation

data GeometricDistribution #

Instances

Eq GeometricDistribution # |
Methods (==) :: GeometricDistribution -> GeometricDistribution -> Bool # (/=) :: GeometricDistribution -> GeometricDistribution -> Bool #
Data GeometricDistribution # |
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 :: (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 #
Read GeometricDistribution # |
Methods readsPrec :: Int -> ReadS GeometricDistribution # readList :: ReadS [GeometricDistribution] # readPrec :: ReadPrec GeometricDistribution # readListPrec :: ReadPrec [GeometricDistribution] #
Show GeometricDistribution # |
Methods showsPrec :: Int -> GeometricDistribution -> ShowS # show :: GeometricDistribution -> String # showList :: [GeometricDistribution] -> ShowS #
Generic GeometricDistribution # |
Associated Types type Rep GeometricDistribution :: * -> * # Methods from :: GeometricDistribution -> Rep GeometricDistribution x # to :: Rep GeometricDistribution x -> GeometricDistribution #
ToJSON GeometricDistribution # |
Methods toJSON :: GeometricDistribution -> Value # toEncoding :: GeometricDistribution -> Encoding #
FromJSON GeometricDistribution # |
Methods parseJSON :: Value -> Parser GeometricDistribution #
Binary GeometricDistribution # |
Methods put :: GeometricDistribution -> Put # get :: Get GeometricDistribution # putList :: [GeometricDistribution] -> Put #
DiscreteGen GeometricDistribution # |
Methods genDiscreteVar :: PrimMonad m => GeometricDistribution -> Gen (PrimState m) -> m Int #
ContGen GeometricDistribution # |
Methods genContVar :: PrimMonad m => GeometricDistribution -> Gen (PrimState m) -> m Double #
Entropy GeometricDistribution # |
Methods entropy :: GeometricDistribution -> Double #
MaybeEntropy GeometricDistribution # |
Methods maybeEntropy :: GeometricDistribution -> Maybe Double #
Variance GeometricDistribution # |
Methods variance :: GeometricDistribution -> Double # stdDev :: GeometricDistribution -> Double #
MaybeVariance GeometricDistribution # |
Methods maybeVariance :: GeometricDistribution -> Maybe Double # maybeStdDev :: GeometricDistribution -> Maybe Double #
Mean GeometricDistribution # |
Methods mean :: GeometricDistribution -> Double #
MaybeMean GeometricDistribution # |
Methods maybeMean :: GeometricDistribution -> Maybe Double #
DiscreteDistr GeometricDistribution # |
Methods probability :: GeometricDistribution -> Int -> Double # logProbability :: GeometricDistribution -> Int -> Double #
Distribution GeometricDistribution # |
Methods cumulative :: GeometricDistribution -> Double -> Double # complCumulative :: GeometricDistribution -> Double -> Double #
type Rep GeometricDistribution # |
type Rep GeometricDistribution = D1 (MetaData "GeometricDistribution" "Statistics.Distribution.Geometric" "statistics-0.13.3.0-116AMxscZNKCm819FAiSIF" True) (C1 (MetaCons "GD" PrefixI True) (S1 (MetaSel (Just Symbol "gdSuccess") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)))

data GeometricDistribution0 #

Instances

Eq GeometricDistribution0 # |
Methods (==) :: GeometricDistribution0 -> GeometricDistribution0 -> Bool # (/=) :: GeometricDistribution0 -> GeometricDistribution0 -> Bool #
Data GeometricDistribution0 # |
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 :: (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 #
Read GeometricDistribution0 # |
Methods readsPrec :: Int -> ReadS GeometricDistribution0 # readList :: ReadS [GeometricDistribution0] # readPrec :: ReadPrec GeometricDistribution0 # readListPrec :: ReadPrec [GeometricDistribution0] #
Show GeometricDistribution0 # |
Methods showsPrec :: Int -> GeometricDistribution0 -> ShowS # show :: GeometricDistribution0 -> String # showList :: [GeometricDistribution0] -> ShowS #
Generic GeometricDistribution0 # |
Associated Types type Rep GeometricDistribution0 :: * -> * # Methods from :: GeometricDistribution0 -> Rep GeometricDistribution0 x # to :: Rep GeometricDistribution0 x -> GeometricDistribution0 #
ToJSON GeometricDistribution0 # |
Methods toJSON :: GeometricDistribution0 -> Value # toEncoding :: GeometricDistribution0 -> Encoding #
FromJSON GeometricDistribution0 # |
Methods parseJSON :: Value -> Parser GeometricDistribution0 #
Binary GeometricDistribution0 # |
Methods put :: GeometricDistribution0 -> Put # get :: Get GeometricDistribution0 # putList :: [GeometricDistribution0] -> Put #
DiscreteGen GeometricDistribution0 # |
Methods genDiscreteVar :: PrimMonad m => GeometricDistribution0 -> Gen (PrimState m) -> m Int #
ContGen GeometricDistribution0 # |
Methods genContVar :: PrimMonad m => GeometricDistribution0 -> Gen (PrimState m) -> m Double #
Entropy GeometricDistribution0 # |
Methods entropy :: GeometricDistribution0 -> Double #
MaybeEntropy GeometricDistribution0 # |
Methods maybeEntropy :: GeometricDistribution0 -> Maybe Double #
Variance GeometricDistribution0 # |
Methods variance :: GeometricDistribution0 -> Double # stdDev :: GeometricDistribution0 -> Double #
MaybeVariance GeometricDistribution0 # |
Methods maybeVariance :: GeometricDistribution0 -> Maybe Double # maybeStdDev :: GeometricDistribution0 -> Maybe Double #
Mean GeometricDistribution0 # |
Methods mean :: GeometricDistribution0 -> Double #
MaybeMean GeometricDistribution0 # |
Methods maybeMean :: GeometricDistribution0 -> Maybe Double #
DiscreteDistr GeometricDistribution0 # |
Methods probability :: GeometricDistribution0 -> Int -> Double # logProbability :: GeometricDistribution0 -> Int -> Double #
Distribution GeometricDistribution0 # |
Methods cumulative :: GeometricDistribution0 -> Double -> Double # complCumulative :: GeometricDistribution0 -> Double -> Double #
type Rep GeometricDistribution0 # |
type Rep GeometricDistribution0 = D1 (MetaData "GeometricDistribution0" "Statistics.Distribution.Geometric" "statistics-0.13.3.0-116AMxscZNKCm819FAiSIF" True) (C1 (MetaCons "GD0" PrefixI True) (S1 (MetaSel (Just Symbol "gdSuccess0") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)))

# Constructors

geometric #

Arguments

:: Double | Success rate
-> GeometricDistribution |

Create geometric distribution.

geometric0 #

Arguments

:: Double | Success rate
-> GeometricDistribution0 |

Create geometric distribution.

## Accessors

gdSuccess :: GeometricDistribution -> Double #

gdSuccess0 :: GeometricDistribution0 -> Double #