probability-0.2.3.1: Probabilistic Functional Programming

Numeric.Probability.Example.Alarm

Contents

Synopsis

Documentation

type Dist a = T Probability a

Numeric.Probability.Example.Alarm network

b :: PBool

prior burglary 1%

e :: PBool

prior earthquake 0.1%

a :: Bool -> Bool -> PBool

conditional probability of alarm given burglary and earthquake

j :: Bool -> PBool

conditional probability of john calling given alarm

m :: Bool -> PBool

conditional probability of mary calling given alarm

data Burglary

calculate the full joint distribution

Constructors

B 

Fields

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

pmj :: Probability

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