# Patterns of Inference: Exercises

*To return to the top level: Probabilistic Models of Cognition.*

## 1

For each of the following programs:

- Draw the dependency diagram (Bayes net). If you don't have software on your computer for doing this, Google Docs has a decent interface for creating drawings.
- Use informal evaluation order reasoning and the intervention method to determine causal dependency between A and B.
- Use conditioning to determine whether A and B are statistically dependent.

(a)

(b)

(c)

(d)

(e)

## 2

Imagine that you are an epidemiologist and you are determining people's cause of death. In this simplified world, there are two main diseases, cancer and the common cold. People rarely have cancer, <math>p( \text{cancer}) = 0.00001</math>, but when they do have cancer, it is often fatal, <math>p( \text{death} \mid \text{cancer} ) = 0.9</math>. People are much more likely to have a common cold, <math>p( \text{cold} ) = 0.2</math>, but it is rarely fatal, <math>p( \text{death} \mid \text{cold} ) = 0.00006</math>. Very rarely, people also die of other causes <math>p(\text{death} \mid \text{other}) = 0.000000001</math>.

Write this model in Church program and use cosh to answer these questions:

a. Compute <math>p( \text{cancer} \mid \text{death} \wedge \text{cold} )</math> and <math>p( \text{cancer} \mid \text{death} \wedge \text{no cold} )</math>. How do these probabilities compare to <math>p( \text{cancer} \mid \text{death} )</math> and <math>p( \text{cancer} )</math>? Using these probabilities, give an example of explaining away.

b. Compute <math>p( \text{cold} \mid \text{death} \wedge \text{cancer} )</math> and <math>p( \text{cold} \mid \text{death} \wedge \text{no cancer} )</math>. How do these probabilities compare to <math>p( \text{cold} \mid \text{death} )</math> and <math>p( \text{cold} )</math>? Using these probabilities, give an example of explaining away.

Be sure to include your code in your answer.