random-fu-0.2.7.4: Random number generation

Data.Random.Distribution.Binomial

Synopsis

# Documentation

integralBinomialCDF :: (Integral a, Real b) => a -> b -> a -> Double Source #

integralBinomialPDF :: (Integral a, Real b) => a -> b -> a -> Double Source #

The probability of getting exactly k successes in n trials is given by the probability mass function:

$f(k;n,p) = \Pr(X = k) = \binom n k p^k(1-p)^{n-k}$

Note that in integralBinomialPDF the parameters of the mass function are given first and the range of the random variable distributed according to the binomial distribution is given last. That is, $$f(2;4,0.5)$$ is calculated by integralBinomialPDF 4 0.5 2.

integralBinomialLogPdf :: (Integral a, Real b) => a -> b -> a -> Double Source #

We use the method given in "Fast and accurate computation of binomial probabilities, Loader, C", http://octave.1599824.n4.nabble.com/attachment/3829107/0/loader2000Fast.pdf

binomial :: Distribution (Binomial b) a => a -> b -> RVar a Source #

binomialT :: Distribution (Binomial b) a => a -> b -> RVarT m a Source #

data Binomial b a Source #

Constructors

 Binomial a b
Instances
 (Real b, Distribution (Binomial b) Integer) => CDF (Binomial b) Integer Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Int) => CDF (Binomial b) Int Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Int8) => CDF (Binomial b) Int8 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Int16) => CDF (Binomial b) Int16 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Int32) => CDF (Binomial b) Int32 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Int64) => CDF (Binomial b) Int64 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Word) => CDF (Binomial b) Word Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Word8) => CDF (Binomial b) Word8 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Word16) => CDF (Binomial b) Word16 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Word32) => CDF (Binomial b) Word32 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Word64) => CDF (Binomial b) Word64 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Integer) => PDF (Binomial b) Integer Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Int) => PDF (Binomial b) Int Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Int8) => PDF (Binomial b) Int8 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Int16) => PDF (Binomial b) Int16 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Int32) => PDF (Binomial b) Int32 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Int64) => PDF (Binomial b) Int64 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Word) => PDF (Binomial b) Word Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Word8) => PDF (Binomial b) Word8 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Word16) => PDF (Binomial b) Word16 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Word32) => PDF (Binomial b) Word32 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods (Real b, Distribution (Binomial b) Word64) => PDF (Binomial b) Word64 Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods Source # Instance detailsDefined in Data.Random.Distribution.Binomial Methods