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 Source #

Instances

Eq GeometricDistribution Source # |
Methods (==) :: GeometricDistribution -> GeometricDistribution -> Bool # (/=) :: GeometricDistribution -> GeometricDistribution -> Bool #
Data GeometricDistribution Source # |

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

data GeometricDistribution0 Source #

Instances

Eq GeometricDistribution0 Source # |
Methods (==) :: GeometricDistribution0 -> GeometricDistribution0 -> Bool # (/=) :: GeometricDistribution0 -> GeometricDistribution0 -> Bool #
Data GeometricDistribution0 Source # |

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

# Constructors

geometric Source #

Arguments

:: Double | Success rate
-> GeometricDistribution |

Create geometric distribution.

geometric0 Source #

Arguments

:: Double | Success rate
-> GeometricDistribution0 |

Create geometric distribution.

## Accessors

gdSuccess :: GeometricDistribution -> Double Source #

gdSuccess0 :: GeometricDistribution0 -> Double Source #