statistics-0.15.0.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
- geometricE :: Double -> Maybe GeometricDistribution
- geometric0 :: Double -> GeometricDistribution0
- geometric0E :: Double -> Maybe GeometricDistribution0
- gdSuccess :: GeometricDistribution -> Double
- gdSuccess0 :: GeometricDistribution0 -> Double

# Documentation

data GeometricDistribution Source #

Distribution over [1..]

Instances

Eq GeometricDistribution Source # |
Instance details Defined in Statistics.Distribution.Geometric Methods (==) :: GeometricDistribution -> GeometricDistribution -> Bool Source # (/=) :: GeometricDistribution -> GeometricDistribution -> Bool Source #
Data GeometricDistribution Source # |

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

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

toConstr :: GeometricDistribution -> Constr Source #

dataTypeOf :: GeometricDistribution -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

data GeometricDistribution0 Source #

Distribution over [0..]

Instances

Eq GeometricDistribution0 Source # |
Instance details Defined in Statistics.Distribution.Geometric Methods (==) :: GeometricDistribution0 -> GeometricDistribution0 -> Bool Source # (/=) :: GeometricDistribution0 -> GeometricDistribution0 -> Bool Source #
Data GeometricDistribution0 Source # |

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

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

toConstr :: GeometricDistribution0 -> Constr Source #

dataTypeOf :: GeometricDistribution0 -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

# Constructors

geometric Source #

Arguments

:: Double | Success rate
-> GeometricDistribution |

Create geometric distribution.

geometricE Source #

Arguments

:: Double | Success rate
-> Maybe GeometricDistribution |

Create geometric distribution.

geometric0 Source #

Arguments

:: Double | Success rate
-> GeometricDistribution0 |

Create geometric distribution.

geometric0E Source #

Arguments

:: Double | Success rate
-> Maybe GeometricDistribution0 |

Create geometric distribution.

## Accessors

gdSuccess :: GeometricDistribution -> Double Source #

gdSuccess0 :: GeometricDistribution0 -> Double Source #