math Prep

Bayes' Theorem and Conditional Probability

Asked by Kiran_Kumar | Textbook Reference: Ross Probability


In a certain town, 1% of the population has a rare disease. A diagnostic test is 95% accurate (i.e., returns positive with 95% probability if the person has the disease, and returns negative with 95% probability if the person does not have the disease). If a randomly selected person tests positive, what is the probability (in percentage) that they actually have the disease?

Community Explanations (3)

Let $D$ be having disease, $H$ healthy, $T_+$ testing positive. - $P(D) = 0.01$, $P(H) = 0.99$. - $P(T_+ \mid D) = 0.95$, $P(T_+ \mid H) = 0.05$. By Bayes' Theorem: $P(D \mid T_+) = \frac{P(T_+ \mid D)P(D)}{P(T_+ \mid D)P(D) + P(T_+ \mid H)P(H)}$ $P(D \mid T_+) = \frac{0.95 \times 0.01}{(0.95 \times 0.01) + (0.05 \times 0.99)}$ $P(D \mid T_+) = \frac{0.0095}{0.0095 + 0.0495} = \frac{0.0095}{0.0590} \approx 16.1\%$ So the answer is **16.1**.

Answered by Pradyumna_Rao | Agreed by 33 peers | ✓ Selected Solution

### Alternative Approach / Shortcut Method We can also solve this problem by eliminating incorrect choices or utilizing shortcut relations. For a GATE candidate, speed is as important as accuracy. Let's apply the standard boundary cases: - Let's check with small values of $N$ (e.g. $N=1, 2, 3$). - By substituting these values into our formulas, we can easily see that options matching the base cases are confirmed. This alternative proof validates our selected consensus solution!

Answered by Rahul_Mehta | Agreed by 10 peers

### Critical Warnings & Common Student Pitfalls Many students make simple mistakes when solving this type of problem in the exam pressure: 1. **Incorrect base case handling:** Forgetting to handle empty arrays, null pointers, or boundary limits like 0/1 properly. 2. **Off-by-one errors:** Especially in address translation, CIDR masks, or index iterations. 3. **Mismatched units:** Mixing up bits vs bytes, or Hertz vs seconds. Always double-check your calculations step-by-step to avoid losing negative marking on simple questions!