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!
 A: Your answer looks correct to me.
A: 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$


And the question asks for
$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} )}$ 
\begin{equation}= \frac{0.2 \times 0.7}{P(\text{recovered} )}\end{equation}
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 
\begin{equation}= \frac{0.2 \times 0.7}{P(\text{recovered} )} \\
=  \frac{0.2 \times 0.7}{0.155}\\
\approx 90.3\% \end{equation} 
Which is exactly what you got. Hm, I am curious. Have you had a chance to talk to your teacher/prof about that?
A: 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
