HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulerandom-fu-0.3.0.1Haskell2010

Data.Random.Distribution.Binomial

  • 1 type
  • 10 values
  • Packagerandom-fu-0.3.0.1
  • Exports11
  • LanguageHaskell2010
  • LicenceLicenseRef-PublicDomain
  • SourceBinomial.hs
valueintegralBinomialPDF :: (Integral a, Real b) => a -> b -> a -> Double
#

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.

datadata Binomial b a
#

Constructors

Instances39CDF, Distribution, PDF, …