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

# Documentation

data BinomialDistribution Source #

The binomial distribution.

Instances

Eq BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods (==) :: BinomialDistribution -> BinomialDistribution -> Bool Source # (/=) :: BinomialDistribution -> BinomialDistribution -> Bool Source #
Data BinomialDistribution Source # |

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 Source #

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

toConstr :: BinomialDistribution -> Constr Source #

dataTypeOf :: BinomialDistribution -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Read BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods readsPrec :: Int -> ReadS BinomialDistribution Source # readList :: ReadS [BinomialDistribution] Source # readPrec :: ReadPrec BinomialDistribution Source # readListPrec :: ReadPrec [BinomialDistribution] Source #
Show BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods showsPrec :: Int -> BinomialDistribution -> ShowS Source # show :: BinomialDistribution -> String Source # showList :: [BinomialDistribution] -> ShowS Source #
Generic BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Associated Types type Rep BinomialDistribution :: Type -> Type Source # Methods from :: BinomialDistribution -> Rep BinomialDistribution x Source # to :: Rep BinomialDistribution x -> BinomialDistribution Source #
ToJSON BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods toJSON :: BinomialDistribution -> Value Source # toEncoding :: BinomialDistribution -> Encoding Source # toJSONList :: [BinomialDistribution] -> Value Source # toEncodingList :: [BinomialDistribution] -> Encoding Source #
FromJSON BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods parseJSON :: Value -> Parser BinomialDistribution Source # parseJSONList :: Value -> Parser [BinomialDistribution] Source #
Binary BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods put :: BinomialDistribution -> Put Source # get :: Get BinomialDistribution Source # putList :: [BinomialDistribution] -> Put Source #
Entropy BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods entropy :: BinomialDistribution -> Double Source #
MaybeEntropy BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods maybeEntropy :: BinomialDistribution -> Maybe Double Source #
Variance BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods variance :: BinomialDistribution -> Double Source # stdDev :: BinomialDistribution -> Double Source #
MaybeVariance BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods maybeVariance :: BinomialDistribution -> Maybe Double Source # maybeStdDev :: BinomialDistribution -> Maybe Double Source #
Mean BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods mean :: BinomialDistribution -> Double Source #
MaybeMean BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods maybeMean :: BinomialDistribution -> Maybe Double Source #
DiscreteDistr BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods probability :: BinomialDistribution -> Int -> Double Source # logProbability :: BinomialDistribution -> Int -> Double Source #
Distribution BinomialDistribution Source # |
Instance details Defined in Statistics.Distribution.Binomial Methods cumulative :: BinomialDistribution -> Double -> Double Source # complCumulative :: BinomialDistribution -> Double -> Double Source #
type Rep BinomialDistribution Source # |

Instance details

Defined in Statistics.Distribution.Binomial

type Rep BinomialDistribution = D1 (MetaData "BinomialDistribution" "Statistics.Distribution.Binomial" "statistics-0.15.0.0-6JZeW98TNbBJdNHw3GDX0L" 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 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

binomialE Source #

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 Source #

Number of trials.

bdProbability :: BinomialDistribution -> Double Source #

Probability.