1
$\begingroup$

The computer program CAD takes as input a randomly selected cat or dog picture from the internet and outputs the decision 'cat' or 'dog'. It is known that CAD correctly classified a cat picture with probability $0.6$ while a dog picture is correctly classified with probability $0.7$. The probability that a random picture is a cat picture equals $0.75$. Given that CAD classifies a picture as a cat, compute the conditional probability that it is in fact a dog picture.

I'm quite sure that this exercise is solvable with Bayer's Rule but I'm not able to compute it, because I think the way that I call the probabilities is not fully correct:
$P(T|C)=0.6$ probability that classified in a true way given that is a cat
$P(T|D)=0.7$ probability that classified in a true way given that is a dog
$P(C)=0.75$ probability that is a cat
$P(T^c|C)=?$ probability that classified in a wrong way given that is a cat
$$P(T^c|C)=\frac{P(C|T^c)*P(T^c)}{P(C|T^c)*P(T^c)+P(C|T)*P(T)}$$ Where is my mistake? How can I solve it?

Edit: $$P(Clas. Wrong|Clas. Cat)=\frac{P(Clas. Cat|Clas. Wrong)*P(Clas. Wrong)}{P(Clas. Cat|Clas. Wrong)*P(Clas. Wrong)+P(Clas. Cat|Clas. Correct)*P(Clas. Correct)}$$

$\endgroup$
1
$\begingroup$

Your mistake seems to be in thinking that the problem asks for (in your notation), $P(T^c|C)$, i.e., the probability that the classification is wrong (event $T^c$) given that the picture is actually a cat (event $C$). The question actually asks for the probability that the classification is wrong given that the picture is classified as a cat. In other words, you were computing the probability of a cat picture being classified as a dog, whereas the problem is about the reverse eerror.

Once you correct that issue, Bayes's theorem should do the job for you. When I did the calculation, I got a probability of $1/7$ (which you're apparently supposed to round off to $0.14$).

$\endgroup$
  • $\begingroup$ Thank you for the answer, I edited the question, but now I have problems to visualize the probabilities with this notation, can you help me? $\endgroup$ – Mark Jacon Jan 26 at 18:24
  • 1
    $\begingroup$ The probability that a picture is really a dog but is classified as a cat is $0.25\times0.3=0.075$. The probability that a picture is really a cat and is classified as a cat is $0.75\times0.6=0.45$. So the total probability of being classified as a cat is $0.075+0.45=0.525$. So the conditional probability of being really a dog, given that it's classified as a cat, is $0.075/0.525$, which reduces to $1/7$. $\endgroup$ – Andreas Blass Jan 26 at 18:41
  • $\begingroup$ Now I understand where I was wrong in the notation, thank you a lot! $\endgroup$ – Mark Jacon Jan 26 at 18:59
1
$\begingroup$

Applying Bayes' Theorem

P( Picuture is CAT/Classified as CAT) $= 0.6\times 0.75 = 0.45\tag1$

P( Picture is DOG/Classfied as CAT)$=0.3\times 0.25 = 0.075\tag2$

What is asked is P(Classified as CAT/Picture is Dog) $= \frac{(2)}{(1)+(2)}$

$\endgroup$
  • $\begingroup$ Thank you but I can't find the correct answer with this formula $\endgroup$ – Mark Jacon Jan 26 at 17:04
  • 1
    $\begingroup$ Could you tell me what the answer is? $\endgroup$ – Satish Ramanathan Jan 26 at 17:33
  • $\begingroup$ is one of these $0.14$, $0.38$, $0.08$, $0.25$, $0.4$, $0.3$ and with your method I have $0.105$ $\endgroup$ – Mark Jacon Jan 26 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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