probability-0.2.4.1: Probabilistic Functional Programming

Safe HaskellSafe-Inferred

Numeric.Probability.Example.Dice

Synopsis

Documentation

type Die = IntSource

twoDice :: Dist (Die, Die)Source

product of independent distributions

sixes :: (Int -> Bool) -> Int -> ProbabilitySource

sixes p n computes the probability of getting p sixes (>1, ==2, ...) when rolling n dice