Safe Haskell | None |
---|---|
Language | Haskell98 |
- integralBinomial :: (Integral a, Floating b, Ord b, Distribution Beta b, Distribution StdUniform b) => a -> b -> RVarT m a
- integralBinomialCDF :: (Integral a, Real b) => a -> b -> a -> Double
- integralBinomialPDF :: (Integral a, Real b) => a -> b -> a -> Double
- integralBinomialLogPdf :: (Integral a, Real b) => a -> b -> a -> Double
- floatingBinomial :: (RealFrac a, Distribution (Binomial b) Integer) => a -> b -> RVar a
- floatingBinomialCDF :: (CDF (Binomial b) Integer, RealFrac a) => a -> b -> a -> Double
- floatingBinomialPDF :: (PDF (Binomial b) Integer, RealFrac a) => a -> b -> a -> Double
- floatingBinomialLogPDF :: (PDF (Binomial b) Integer, RealFrac a) => a -> b -> a -> Double
- binomial :: Distribution (Binomial b) a => a -> b -> RVar a
- binomialT :: Distribution (Binomial b) a => a -> b -> RVarT m a
- data Binomial b a = Binomial a b
Documentation
integralBinomial :: (Integral a, Floating b, Ord b, Distribution Beta b, Distribution StdUniform b) => a -> b -> RVarT m a 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
floatingBinomial :: (RealFrac a, Distribution (Binomial b) Integer) => a -> b -> RVar a Source #
Binomial a b |