statistics-0.16.2.1: 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 | Haskell2010

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
- binomialE :: Int -> Double -> Maybe BinomialDistribution
- bdTrials :: BinomialDistribution -> Int
- bdProbability :: BinomialDistribution -> Double

# Documentation

data BinomialDistribution #

The binomial distribution.

#### Instances

Instances details

FromJSON BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods parseJSON :: Value -> Parser BinomialDistribution # parseJSONList :: Value -> Parser [BinomialDistribution] # omittedField :: Maybe BinomialDistribution #
ToJSON BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods toJSON :: BinomialDistribution -> Value # toEncoding :: BinomialDistribution -> Encoding # toJSONList :: [BinomialDistribution] -> Value # toEncodingList :: [BinomialDistribution] -> Encoding # omitField :: BinomialDistribution -> Bool #
Data BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial 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 :: forall r r'. (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 #
Generic BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Associated Types
type Rep BinomialDistribution |
Instance details Defined in Statistics.Distribution.Binomial type Rep BinomialDistribution = D1 ('MetaData "BinomialDistribution" "Statistics.Distribution.Binomial" "statistics-0.16.2.1-9EJt18csjGeB8Yk5f7eGk5" 'False) (C1 ('MetaCons "BD" 'PrefixI 'True) (S1 ('MetaSel ('Just "bdTrials") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "bdProbability") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double)))
Methods from :: BinomialDistribution -> Rep BinomialDistribution x # to :: Rep BinomialDistribution x -> BinomialDistribution #
Read BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods readsPrec :: Int -> ReadS BinomialDistribution # readList :: ReadS [BinomialDistribution] # readPrec :: ReadPrec BinomialDistribution # readListPrec :: ReadPrec [BinomialDistribution] #
Show BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods showsPrec :: Int -> BinomialDistribution -> ShowS # show :: BinomialDistribution -> String # showList :: [BinomialDistribution] -> ShowS #
Binary BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods put :: BinomialDistribution -> Put # get :: Get BinomialDistribution # putList :: [BinomialDistribution] -> Put #
Eq BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods (==) :: BinomialDistribution -> BinomialDistribution -> Bool # (/=) :: BinomialDistribution -> BinomialDistribution -> Bool #
DiscreteDistr BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods probability :: BinomialDistribution -> Int -> Double # logProbability :: BinomialDistribution -> Int -> Double #
Distribution BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods cumulative :: BinomialDistribution -> Double -> Double # complCumulative :: BinomialDistribution -> Double -> Double #
Entropy BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods entropy :: BinomialDistribution -> Double #
MaybeEntropy BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods maybeEntropy :: BinomialDistribution -> Maybe Double #
MaybeMean BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods maybeMean :: BinomialDistribution -> Maybe Double #
MaybeVariance BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods maybeVariance :: BinomialDistribution -> Maybe Double # maybeStdDev :: BinomialDistribution -> Maybe Double #
Mean BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods mean :: BinomialDistribution -> Double #
Variance BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial Methods variance :: BinomialDistribution -> Double # stdDev :: BinomialDistribution -> Double #
type Rep BinomialDistribution # |
Instance details Defined in Statistics.Distribution.Binomial type Rep BinomialDistribution = D1 ('MetaData "BinomialDistribution" "Statistics.Distribution.Binomial" "statistics-0.16.2.1-9EJt18csjGeB8Yk5f7eGk5" 'False) (C1 ('MetaCons "BD" 'PrefixI 'True) (S1 ('MetaSel ('Just "bdTrials") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "bdProbability") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double)))

# Constructors

binomial #

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

binomialE #

Arguments

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

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

# Accessors

bdTrials :: BinomialDistribution -> Int #

Number of trials.

bdProbability :: BinomialDistribution -> Double #

Probability.