statistics-0.16.2.0: A library of statistical types, data, and functions
Copyright(c) 2022 Lorenz Minder
LicenseBSD3
Maintainerlminder@gmx.net
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Statistics.Distribution.NegativeBinomial

Description

The negative binomial distribution. This is the discrete probability distribution of the number of failures in a sequence of independent yes/no experiments before a specified number of successes r. Each Bernoulli trial has success probability p in the range (0, 1]. The parameter r must be positive, but does not have to be integer.

Synopsis

Documentation

data NegativeBinomialDistribution Source #

The negative binomial distribution.

Instances

Instances details
FromJSON NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

ToJSON NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

Data NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NegativeBinomialDistribution -> c NegativeBinomialDistribution #

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

toConstr :: NegativeBinomialDistribution -> Constr #

dataTypeOf :: NegativeBinomialDistribution -> DataType #

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

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

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

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

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

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

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

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

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

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

Generic NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

Associated Types

type Rep NegativeBinomialDistribution :: Type -> Type #

Read NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

Show NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

Binary NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

Eq NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

DiscreteDistr NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

Distribution NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

Entropy NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

MaybeEntropy NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

MaybeMean NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

MaybeVariance NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

Mean NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

Variance NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

type Rep NegativeBinomialDistribution Source # 
Instance details

Defined in Statistics.Distribution.NegativeBinomial

type Rep NegativeBinomialDistribution = D1 ('MetaData "NegativeBinomialDistribution" "Statistics.Distribution.NegativeBinomial" "statistics-0.16.2.0-Iazw6pxXVUYHaurUiPE2b2" 'False) (C1 ('MetaCons "NBD" 'PrefixI 'True) (S1 ('MetaSel ('Just "nbdSuccesses") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "nbdProbability") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double)))

Constructors

negativeBinomial Source #

Arguments

:: Double

Number of successes.

-> Double

Success probability.

-> NegativeBinomialDistribution 

Construct negative binomial distribution. Number of failures r must be positive and probability must be in (0,1] range

negativeBinomialE Source #

Arguments

:: Double

Number of successes.

-> Double

Success probability.

-> Maybe NegativeBinomialDistribution 

Construct negative binomial distribution. Number of failures r must be positive and probability must be in (0,1] range

Accessors

nbdSuccesses :: NegativeBinomialDistribution -> Double Source #

Number of successes until stop