Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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!

share|cite|improve this question
Note that $0.6627$ is not possible, the answer must be bigger than $70\%$. – André Nicolas May 18 '14 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. – James May 18 '14 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\%$. – André Nicolas May 18 '14 at 23:47

Your answer looks correct to me.

share|cite|improve this answer

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}


$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?

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.