1. ## Bayes Theorem question

Suppose the probability of a person having a headache is 0.01
the probability of a person having a fever given that the person has a headache is 0.4
the probability of a person having a fever is 0.02

What is the probability that if a person has a headache given that the person have a fever?

2. Originally Posted by Frostking
Suppose the probability of a person having a headache is 0.01
the probability of a person having a fever given that the person has a headache is 0.4
the probability of a person having a fever is 0.02

What is the probability that if a person has a headache given that the person have a fever?
Let A denote a headache and B denote a fever.

Therefore, we have:
$\displaystyle P(A) = 0.01$

$\displaystyle P(B) = 0.02$

$\displaystyle P(B|A) = 0.4$

Bayes Rule states:

$\displaystyle P(B|A) = \frac{P(A \cap B)}{P(A)}$

Evaluating, we get:

$\displaystyle P(A \cap B) = (0.4)(0.01)$

$\displaystyle P(A \cap B) = 0.004$

Now, use Bayes Rule again for our question that asks for a headache given a fever. That is:

$\displaystyle P(A|B) = \frac{P(A \cap B)}{P(B)}$

Evaluating, we get:

$\displaystyle P(A|B) = \frac{0.004}{0.02}$

$\displaystyle P(A|B) = 0.2$

If you ever have a complement problem using Bayes Rule, you can use my calculator. It won't solve this particular problem, but I'll build that in the future. It solves certain other problems:

Bayes Rule