probability-0.2.2.1: Probabilistic Functional Programming
Source code
Contents
Index
Numeric.Probability.Example.Boys
Description
Consider a family of two children. Given that there is a boy in the family, what is the probability that there are two boys in the family?
Documentation
type
Probability
=
Rational
Source
type
Dist
a =
T
Probability
a
Source
data
Child
Source
Constructors
Boy
Girl
Instances
Eq
Child
Ord
Child
Show
Child
type
Family
= (
Child
,
Child
)
Source
birth
::
Dist
Child
Source
family
::
Dist
Family
Source
allBoys
::
Event
Family
Source
existsBoy
::
Event
Family
Source
familyWithBoy
::
Dist
Family
Source
twoBoys
::
Probability
Source
countBoy
::
Child
->
Int
Source
countBoys
::
Family
->
Int
Source
numBoys
::
Dist
Int
Source
Produced by
Haddock
version 2.4.2