probability-0.2.4.1: Probabilistic Functional Programming
Numeric.Probability.Example.Dice
Synopsis
type Die = IntSource
type Probability = RationalSource
type Dist = T ProbabilitySource
die :: Dist DieSource
twoDice :: Dist (Die, Die)Source
product of independent distributions
dice :: Int -> Dist [Die]Source
twoSixes :: ProbabilitySource
sixes :: (Int -> Bool) -> Int -> ProbabilitySource
sixes p n computes the probability of getting p sixes (>1, ==2, ...) when rolling n dice
sixes p n
>1
==2
droll :: Dist DieSource
g3 :: ProbabilitySource
addTwo :: Dist DieSource