Copyright | (c) 2009 Bryan O'Sullivan |
---|---|
License | BSD3 |
Maintainer | bos@serpentine.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
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.