- bernoulli :: Distribution (Bernoulli b) a => b -> RVar a
- boolBernoulli :: (Fractional a, Ord a, Distribution StdUniform a) => a -> RVar Bool
- boolBernoulliCDF :: Real a => a -> Bool -> Double
- generalBernoulli :: Distribution (Bernoulli b) Bool => a -> a -> b -> RVar a
- generalBernoulliCDF :: CDF (Bernoulli b) Bool => (a -> a -> Bool) -> a -> a -> b -> a -> Double
- data Bernoulli b a = Bernoulli b
Generate a Bernoulli variate with the given probability. For
bernoulli p will return True (p*100)% of the time and False otherwise.
For numerical types, True is replaced by 1 and False by 0.
generalBernoulli t f p generates a random variable whose value is
f with probability