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

Numeric.Probability.Example.Diagnosis

Description

You take part in a screening test for a disease that you have with a probability pDisease . The test can fail in two ways: If you are ill, the test says with probability pFalseNegative that you are healthy. If you are healthy, it says with probability pFalsePositive that you are ill.

Now consider the test is positive - what is the probability that you are indeed ill?

Documentation

type Probability = Rational Source #

type Dist a = T Probability a Source #

data State Source #

Constructors

Ill

Instances

Instances details
Instance details

Defined in Numeric.Probability.Example.Diagnosis

Instance details

Defined in Numeric.Probability.Example.Diagnosis

Methods

showsPrec :: Int -> State -> ShowS #

show :: State -> String #

showList :: [State] -> ShowS #

Instance details

Defined in Numeric.Probability.Example.Diagnosis

Methods

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

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

Instance details

Defined in Numeric.Probability.Example.Diagnosis

Methods

compare :: State -> State -> Ordering #

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

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

(>) :: State -> State -> Bool #

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

max :: State -> State -> State #

min :: State -> State -> State #

data Finding Source #

Constructors

Instances

Instances details
Instance details

Defined in Numeric.Probability.Example.Diagnosis

Methods

showsPrec :: Int -> Finding -> ShowS #

show :: Finding -> String #

showList :: [Finding] -> ShowS #

Instance details

Defined in Numeric.Probability.Example.Diagnosis

Methods

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

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

pDisease :: Probability Source #

pFalseNegative :: Probability Source #

pFalsePositive :: Probability Source #

dist :: Dist (State, Finding) Source #

distAlt :: Dist (State, Finding) Source #

Alternative way for computing the distribution. It is usually more efficient because we do not need to switch on the healthy state.

p :: Probability Source #

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