statistics-0.16.2.0: A library of statistical types, data, and functions
Copyright(c) 2016 André Szabolcs Szelp
LicenseBSD3
Maintainera.sz.szelp@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Statistics.Distribution.DiscreteUniform

Description

The discrete uniform distribution. There are two parametrizations of this distribution. First is the probability distribution on an inclusive interval {1, ..., n}. This is parametrized with n only, where p_1, ..., p_n = 1/n. (discreteUniform).

The second parametrization is the uniform distribution on {a, ..., b} with probabilities p_a, ..., p_b = 1/(a-b+1). This is parametrized with a and b. (discreteUniformAB)

Synopsis

Documentation

data DiscreteUniform Source #

The discrete uniform distribution.

Instances

Instances details
FromJSON DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

ToJSON DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

Data DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

Methods

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

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

toConstr :: DiscreteUniform -> Constr #

dataTypeOf :: DiscreteUniform -> DataType #

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

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

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

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

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

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

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

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

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

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

Generic DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

Associated Types

type Rep DiscreteUniform :: Type -> Type #

Read DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

Show DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

Binary DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

Eq DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

ContGen DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

DiscreteDistr DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

DiscreteGen DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

Distribution DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

Entropy DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

MaybeEntropy DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

MaybeMean DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

MaybeVariance DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

Mean DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

Variance DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

type Rep DiscreteUniform Source # 
Instance details

Defined in Statistics.Distribution.DiscreteUniform

type Rep DiscreteUniform = D1 ('MetaData "DiscreteUniform" "Statistics.Distribution.DiscreteUniform" "statistics-0.16.2.0-Iazw6pxXVUYHaurUiPE2b2" 'False) (C1 ('MetaCons "U" 'PrefixI 'True) (S1 ('MetaSel ('Just "rangeFrom") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "rangeTo") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int)))

Constructors

discreteUniform Source #

Arguments

:: Int

Range

-> DiscreteUniform 

Construct discrete uniform distribution on support {1, ..., n}. Range n must be >0.

discreteUniformAB Source #

Arguments

:: Int

Lower boundary (inclusive)

-> Int

Upper boundary (inclusive)

-> DiscreteUniform 

Construct discrete uniform distribution on support {a, ..., b}.

Accessors

rangeFrom :: DiscreteUniform -> Int Source #

a, the lower bound of the support {a, ..., b}

rangeTo :: DiscreteUniform -> Int Source #

b, the upper bound of the support {a, ..., b}