HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulerandom-fu-0.3.0.1Haskell2010

Data.Random.Distribution.Binomial

Synopsis
  • 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, …