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.Binomial

Contents

- Constructors
- Accessors

Description

The binomial distribution. This is the discrete probability distribution of the number of successes in a sequence of n independent yes/no experiments, each of which yields success with probability p.

Synopsis

- data BinomialDistribution
- binomial :: Int -> Double -> BinomialDistribution
- bdTrials :: BinomialDistribution -> Int
- bdProbability :: BinomialDistribution -> Double

# Documentation

data BinomialDistribution Source #

The binomial distribution.

Instances

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

Methods

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

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

toConstr :: BinomialDistribution -> Constr #

dataTypeOf :: BinomialDistribution -> DataType #

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

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

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

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

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

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

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

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

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

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

Read BinomialDistribution Source # |
Methods readsPrec :: Int -> ReadS BinomialDistribution # readList :: ReadS [BinomialDistribution] # readPrec :: ReadPrec BinomialDistribution # readListPrec :: ReadPrec [BinomialDistribution] #
Show BinomialDistribution Source # |
Methods showsPrec :: Int -> BinomialDistribution -> ShowS # show :: BinomialDistribution -> String # showList :: [BinomialDistribution] -> ShowS #
Generic BinomialDistribution Source # |
Associated Types type Rep BinomialDistribution :: * -> * # Methods from :: BinomialDistribution -> Rep BinomialDistribution x # to :: Rep BinomialDistribution x -> BinomialDistribution #
ToJSON BinomialDistribution Source # |
Methods toJSON :: BinomialDistribution -> Value # toEncoding :: BinomialDistribution -> Encoding # toJSONList :: [BinomialDistribution] -> Value # toEncodingList :: [BinomialDistribution] -> Encoding #
FromJSON BinomialDistribution Source # |
Methods parseJSON :: Value -> Parser BinomialDistribution # parseJSONList :: Value -> Parser [BinomialDistribution] #
Binary BinomialDistribution Source # |
Methods put :: BinomialDistribution -> Put # get :: Get BinomialDistribution # putList :: [BinomialDistribution] -> Put #
Entropy BinomialDistribution Source # |
Methods entropy :: BinomialDistribution -> Double Source #
MaybeEntropy BinomialDistribution Source # |
Methods maybeEntropy :: BinomialDistribution -> Maybe Double Source #
Variance BinomialDistribution Source # |
Methods variance :: BinomialDistribution -> Double Source # stdDev :: BinomialDistribution -> Double Source #
MaybeVariance BinomialDistribution Source # |
Methods maybeVariance :: BinomialDistribution -> Maybe Double Source # maybeStdDev :: BinomialDistribution -> Maybe Double Source #
Mean BinomialDistribution Source # |
Methods mean :: BinomialDistribution -> Double Source #
MaybeMean BinomialDistribution Source # |
Methods maybeMean :: BinomialDistribution -> Maybe Double Source #
DiscreteDistr BinomialDistribution Source # |
Methods probability :: BinomialDistribution -> Int -> Double Source # logProbability :: BinomialDistribution -> Int -> Double Source #
Distribution BinomialDistribution Source # |
Methods cumulative :: BinomialDistribution -> Double -> Double Source # complCumulative :: BinomialDistribution -> Double -> Double Source #
type Rep BinomialDistribution Source # |
type Rep BinomialDistribution = D1 (MetaData "BinomialDistribution" "Statistics.Distribution.Binomial" "statistics-0.13.3.0-Fvkducafmyw9ljEnBhS6Nm" False) (C1 (MetaCons "BD" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "bdTrials") SourceUnpack SourceStrict DecidedUnpack) (Rec0 Int)) (S1 (MetaSel (Just Symbol "bdProbability") SourceUnpack SourceStrict DecidedUnpack) (Rec0 Double))))

# Constructors

binomial Source #

Arguments

:: Int | Number of trials.
-> Double | Probability.
-> BinomialDistribution |

Construct binomial distribution. Number of trials must be non-negative and probability must be in [0,1] range

# Accessors

bdTrials :: BinomialDistribution -> Int Source #

Number of trials.

bdProbability :: BinomialDistribution -> Double Source #

Probability.