probability and bayes' theorem A veterinarian who specializes in large cat breeds categorizes his patients’ visits according to the primary reason for their visit.  In the past year, 10% of the cats had been diagnosed with cancer, 30% had bacterial infections, and the remaining visits were for routine vaccinations.  According to the doctor’s records, 40% of the cats with cancer died of that illness, 10% of the cats with bacterial infection died of that illness, and 1% of the cats died from adverse reactions to their vaccinations.  Given that a cat survived, what is the probability that the cat was categorized as having a bacterial infection?
P(Cancer) - 0.10, and P(Bacterial infection|Cat survived) = P(CAt survived & Bacterial infection)/P(Cat survived)
Find the percentage of cats which survived: 0.96
find the percentage of cats with a bacteria infection that survived.
 A: Given Data:


*

*$P(\text{cat has cancer})=\color\red{0.1}$

*$P(\text{cat with cancer dies})=\color\orange{0.4}$

*$P(\text{cat has bacterial infection})=\color\green{0.3}$

*$P(\text{cat with bacterial infection dies})=\color\purple{0.1}$

*$P(\text{cat requires routine vaccination})=\color\gray{0.6}$

*$P(\text{cat with routine vaccination dies})=\color\magenta{0.01}$



Let $A$ denote the event in which a cat has a bacterial infection.
Let $B$ denote the event in which a cat survives (i.e., does not die).
Then $P(A|B)=\frac{P(A\cap B)}{P(B)}=\frac{\color\green{0.3}\cdot(1-\color\purple{0.1})}{\color\red{0.1}\cdot(1-\color\orange{0.4})+\color\green{0.3}\cdot(1-\color\purple{0.1})+\color\gray{0.6}\cdot(1-\color\magenta{0.01})}\approx29.22\%$.
A: I'm going to show you how to work a separate problem.
Given that a cat died, what is the probability that it had cancer?
We need to first calculate the probability of a cat dying.  If a cat has cancer it has a $40\%$ chance of dying, if it has a bacterial infection it has a $10\%$ chance of dying, and if it has none-of-the-above (it's just a routine vaccination) then it has a $1\%$ chance of dying.  To do that, we use the conditional probabilities given:
\begin{align}
p\left(\text{dead}\right) =&\ p\left(\text{cancer}\right)\cdot p\left(\text{dead}\ |\ \text{cancer}\right) + p\left(\text{bact}\right)\cdot p\left(\text{dead}\ |\ \text{bact}\right) + p\left(\text{vacc}\right)\cdot p\left(\text{dead}\ |\ \text{vacc}\right)\\
=&\ 0.10 \cdot 0.40 + 0.30\cdot 0.10 + 0.60\cdot 0.01 \\
=&\ 4\% + 3\% + 0.6\% \\
=&\ 7.6\%
\end{align}
The $60\%$ chance of coming for a vaccine comes from the fact that all such visits are either 1) cancer ($10\%$), 2) bacterial ($30\%$), or 3) vaccines ($100\% - 30\% - 10\% = 60\%$).
Now given that the cat died ($7.6\%$ chance) what is the probability that it had cancer?  Well $4\%$ of all cats had cancer and died, $3\%$ of all cats had a bacterial infection and died, and $0.5\%$ of all cats had neither but died anyway.  So it's very simple to find the probability that a cat had cancer given that it died:
$$
p\left(\text{cancer}\ |\ \text{died}\right) = \frac{4}{7.6} \approx 52.6\%
$$
