statistics-0.14.0.2: A library of statistical types, data, and functions

Copyright (c) 2016 André Szabolcs Szelp BSD3 a.sz.szelp@gmail.com experimental portable None Haskell98

Statistics.Distribution.DiscreteUniform

Contents

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 parametrizaton 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

The discrete uniform distribution.

Instances

 Source # Methods Source # Methodsgfoldl :: (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 #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 :: (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 # Source # Methods Source # MethodsshowList :: [DiscreteUniform] -> ShowS # Source # Associated Typestype Rep DiscreteUniform :: * -> * # Methods Source # MethodstoJSONList :: [DiscreteUniform] -> Value # Source # Methods Source # MethodsputList :: [DiscreteUniform] -> Put # Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # type Rep DiscreteUniform = D1 (MetaData "DiscreteUniform" "Statistics.Distribution.DiscreteUniform" "statistics-0.14.0.2-9wDz1lVU92ZDJSrAe5uHzb" False) (C1 (MetaCons "U" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "rangeFrom") SourceUnpack SourceStrict DecidedUnpack) (Rec0 Int)) (S1 (MetaSel (Just Symbol "rangeTo") SourceUnpack SourceStrict DecidedUnpack) (Rec0 Int))))

# Constructors

Arguments

 :: Int Range -> DiscreteUniform

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

Arguments

 :: Int Lower boundary (inclusive) -> Int Upper boundary (inclusive) -> DiscreteUniform

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

# Accessors

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

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