Cancer Test Probability
1. **Problem Statement:**
We have a test for cancer detection with the following data:
- Total adults tested: 1000
- Prevalence of cancer: 1% (so 10 people have cancer)
- Test sensitivity (true positive rate): 97% (test indicates cancer in 97% of those who have it)
- Test false positive rate: 1% (test indicates cancer in 1% of those who do not have it)
We want to find:
- $P(\text{Cancer} | \text{Test indicates cancer})$
- $P(\text{Cancer} | \text{Test does not indicate cancer})$
2. **Formulas and Rules:**
We use Bayes' theorem:
$$
P(A|B) = \frac{P(B|A)P(A)}{P(B)}
$$
where:
- $A$ is the event "person has cancer"
- $B$ is the event "test indicates cancer"
Also, the complement rule:
$$
P(\text{not } A) = 1 - P(A)
$$
3. **Calculate probabilities:**
- $P(\text{Cancer}) = 0.01$
- $P(\text{No cancer}) = 0.99$
- $P(\text{Test indicates cancer} | \text{Cancer}) = 0.97$
- $P(\text{Test indicates cancer} | \text{No cancer}) = 0.01$
4. **Calculate $P(\text{Test indicates cancer})$ using total probability:**
$$
P(\text{Test indicates cancer}) = P(\text{Test indicates cancer} | \text{Cancer})P(\text{Cancer}) + P(\text{Test indicates cancer} | \text{No cancer})P(\text{No cancer})
$$
$$
= 0.97 \times 0.01 + 0.01 \times 0.99 = 0.0097 + 0.0099 = 0.0196
$$
5. **Calculate $P(\text{Cancer} | \text{Test indicates cancer})$ using Bayes' theorem:**
$$
P(\text{Cancer} | \text{Test indicates cancer}) = \frac{0.97 \times 0.01}{0.0196} = \frac{0.0097}{0.0196} \approx 0.495
$$
6. **Calculate $P(\text{Test does not indicate cancer})$:**
$$
P(\text{Test does not indicate cancer}) = 1 - P(\text{Test indicates cancer}) = 1 - 0.0196 = 0.9804
$$
7. **Calculate $P(\text{Test does not indicate cancer} | \text{Cancer})$ and $P(\text{Test does not indicate cancer} | \text{No cancer})$:**
$$
P(\text{Test does not indicate cancer} | \text{Cancer}) = 1 - 0.97 = 0.03
$$
$$
P(\text{Test does not indicate cancer} | \text{No cancer}) = 1 - 0.01 = 0.99
$$
8. **Calculate $P(\text{Cancer} | \text{Test does not indicate cancer})$ using Bayes' theorem:**
$$
P(\text{Cancer} | \text{Test does not indicate cancer}) = \frac{P(\text{Test does not indicate cancer} | \text{Cancer})P(\text{Cancer})}{P(\text{Test does not indicate cancer})} = \frac{0.03 \times 0.01}{0.9804} = \frac{0.0003}{0.9804} \approx 0.000306
$$
**Final answers:**
- Probability of having cancer given test indicates cancer: $\boxed{0.495}$
- Probability of having cancer given test does not indicate cancer: $\boxed{0.0003}$ (rounded to three decimal places)