probability-0.2.8: Probabilistic Functional Programming
Safe HaskellSafe-Inferred
LanguageHaskell98

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

Instances

Instances details
Instance details

Defined in Numeric.Probability.Example.Boys

Methods

showsPrec :: Int -> Child -> ShowS #

show :: Child -> String #

showList :: [Child] -> ShowS #

Instance details

Defined in Numeric.Probability.Example.Boys

Methods

(==) :: Child -> Child -> Bool #

(/=) :: Child -> Child -> Bool #

Instance details

Defined in Numeric.Probability.Example.Boys

Methods

compare :: Child -> Child -> Ordering #

(<) :: Child -> Child -> Bool #

(<=) :: Child -> Child -> Bool #

(>) :: Child -> Child -> Bool #

(>=) :: Child -> Child -> Bool #

max :: Child -> Child -> Child #

min :: Child -> Child -> 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 #

AltStyle によって変換されたページ (->オリジナル) /