Copyright | (c) 2009 Bryan O'Sullivan |
---|---|
License | BSD3 |
Maintainer | bos@serpentine.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
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.
- data BinomialDistribution
- binomial :: Int -> Double -> BinomialDistribution
- binomialE :: Int -> Double -> Maybe BinomialDistribution
- bdTrials :: BinomialDistribution -> Int
- bdProbability :: BinomialDistribution -> Double
Documentation
data BinomialDistribution Source #
The binomial distribution.
Constructors
:: 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
:: 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.