# Bayes Rule and Conditional Probability

This is an exam I totally failed to answer and I need your help!

The probability of correct diagnosis (either positive or negative) of measles is 0.76 and the proportion of people in a population suffering from the measles is 0.02%. A randomly selected person from this population is tested for the measles.

1) What is the probability that the test result is positive?

P(test is positive) = ?

2) Assuming the test result is positive, what is the probability that the diagnosis is correct?

P(person has measles|test is positive)= ?

The first one I solved as: $$P(Correct | Has Measles) = P(Correct) \times P(Has Measles)$$

However, they claim the correct answer is: 0.24 ... is that correct? and how please?

The second question I solved using Bayes rule: $$P(Correct | is Positive) = \frac{P(is Positive | Correct) \times P(Correct)}{ P(is Positive )}$$

However they claim the correct answer is 0.001 .. also if that is correct? how please?

• In the first question, you ignore false positives. In the second question, you mistakenly substitute "has measles" for "is positive". Commented Oct 26, 2019 at 16:52
• @saulspatz And sorry, the second one was typo, I fixed it
– Mike
Commented Oct 26, 2019 at 17:15

One common mistake is that one tries to solve problems about Bayes rules with intuition, and often gets mistakes. I found the following methodical tricks work well.

1. Write down conditions given and questions asked in precise probability terms.
2. Use mathematical manipulation (including Bayes rule and rules about marginal probability, joint probability) to solve the problem.

Specifically in this question, the given conditions:

• P(test is positive | has measles) = P(test is negative | no measles) = 0.76
• P(has measles) = 0.02%=0.0002

Questions:

• P(test is positive)
• P(has measles | test is positive)

Now mathematical manipulation:

• P(test is positive) = P(test is positive, has measles) + P(test is positive, no measles) = P(test is positive | has measles)P(has measles) + P(test is positive | no measles) P(no measles) = 0.76 * 0.0002 + (1-0.76)*(1-0.002) = 0.240104.
• P(has measles | test is positive) = P(test is positive | has measles) * P(has measles) / P(test is positive) = 0.76 * 0.0002 / 0.240104 = 0.000633.

The main point of my answer is more of showing the trick than giving the answer. Hope it helps.

• Thanks very much and +1, I missed the false positives. Regarding second questions, they claimed it is 0.001? And on scale from 1 to 10 how difficult the questions are for an introduction to stats exam ?
– Mike
Commented Oct 26, 2019 at 17:23
• My guess is $0.001 \approx 0.000633$. Not sure about the scale of difficulty. Commented Oct 26, 2019 at 17:25