# Probability question - (Probably) Bayes' Rule and Total Probability Theorem

I just took a probability final exam and was fairly confident in my solution of 28/31, but I wanted to be sure... because according to http://www.stat.tamu.edu/~derya/stat211/SummerII02/Final.Summer02.doc which has it as the second question, the answer is .6627. What's discerning is that they have the decimal equivalent of 28/31 as one of their answers which makes it seem like they know something I don't...

"Seventy percent of all cattle are treated by an injected vaccine to combat a serious disease. The probability of recovery from the disease is 1 in 20 if untreated and 1 in 5 if treated. Given that an infected cow has recovered, what is the probability that the cow received the preventive vaccine?"

Here's my solution: Let A be the event a cow recovered, let B be the event a cow received the vaccine.

We are given:

P(A|B) = 1/5

P(A|~B) = 1/20

P(B) = 7/10


We want to find P(B|A), so use Bayes' rule and the total probability theorem to find

P(B|A) = P(A|B) x P(B) / (P(A|B) x P(B) + P(A|~B) x P(~B) ).

Plugging in the values from what's given above, we get (.2 x .7) / (.2 x .7 + .05 x .3) which gives 28/31.

If I'm wrong, I'd love to be pointed in the right direction haha

Thank you!

• Note that $0.6627$ is not possible, the answer must be bigger than $70\%$. May 18, 2014 at 23:36
• I disagree. The 70% is referring to the amount of cows treated, and the question is asking if a cow recovers what the probability she got the vaccine to begin with. If the problem said the probability of recovering is 0 for cows who did not receive the vaccine, then the solution would be 100% for what they're asking. May 18, 2014 at 23:43
• It seems we agree that since the probability of recovery is better if treated than if untreated, the answer must be greater than $70\%$. You have given a correct argument that it can be as high as $100\%$. May 18, 2014 at 23:47

Okay, let's see what's given:

$P(\text{recovered} \mid \text{vaccine}) = \frac{1}{5} = 0.2$

$P(\text{recovered} \mid \text{no-vaccine}) = \frac{1}{20} = 0.05$

$P(\text{vaccine} ) = 0.7$

$P(\text{no-vaccine} ) = 0.3$

$P(\text{vaccine} \mid \text{recovered} ) = ?$

The Bayes rule is:

$P(\text{vaccine} \mid \text{recovered} ) = \frac{P(\text{recovered} \mid \text{vaccine}) \times P(\text{vaccine} )}{P(\text{recovered} )}$ $$= \frac{0.2 \times 0.7}{P(\text{recovered} )}$$

where

$P(\text{recovered} ) = P(\text{rec} \mid \text{vac}) \times P(\text{vac} ) + P(\text{rec} \mid \text{no-vac}) \times P(\text{no-vac} ) \\ = 0.2 \times 0.7 + 0.05 \times 0.3 = 0.155$

plugin it back into the equation

$$= \frac{0.2 \times 0.7}{P(\text{recovered} )} \\ = \frac{0.2 \times 0.7}{0.155}\\ \approx 90.3\%$$

Which is exactly what you got. Hm, I am curious. Have you had a chance to talk to your teacher/prof about that?

I get .68, probably rounding but what happened was you fell off right at start and the checkers accepted your term definitions which are incorrect. A=1/4 B=7/10 and P(A/~B)=1/10