probability-0.2.4: Probabilistic Functional Programming

Safe HaskellSafe-Infered

Numeric.Probability.Example.Alarm

Contents

Synopsis

Documentation

Numeric.Probability.Example.Alarm network

b :: PBoolSource

prior burglary 1%

e :: PBoolSource

prior earthquake 0.1%

a :: Bool -> Bool -> PBoolSource

conditional probability of alarm given burglary and earthquake

j :: Bool -> PBoolSource

conditional probability of john calling given alarm

m :: Bool -> PBoolSource

conditional probability of mary calling given alarm

data Burglary Source

calculate the full joint distribution

Constructors

B 

Fields

burglary :: Bool
 
earthquake :: Bool
 
alarm :: Bool
 
john :: Bool
 
mary :: Bool
 

pmj :: ProbabilitySource

what is the probability that mary calls given that john calls?