1

I am confused about this question for a while right now and I will need some help.

We want to classify a fruit to be an apple or a banana based on the color yellow or green. We obtain a random sample of 1000 bananas and 1000 apples. In fact, 800 bananas are yellow and 600 apples are green. Moreover, we are given information that apples are 3 times more frequent than bananas. Calculate P(Apple|Yellow).

My approach was the following:

denote Apple as A, Banana as B, Yellow as Y and Green as G

We know that P(A)= 0.75 and P(B)=0.25 and P(Y|B) = 0.8 and P(G|A) = 0.6.

So the Bayes' Theorem is P(A|Y) = $\frac{P(Y|A)P(A)}{P(Y|A)P(A) + P(Y|B)P(B)}$

So we can obtain P(Y|A) = 1 - P(Y|B) = 0.2

So we end up with $\frac{0.2 * 0.75}{0.2 * 0.75 + 0.8 * 0.25}$=$\frac{3}{7}$.

Is this answer correct or am I missing something here?

  • Possibly helpful: https://math.stackexchange.com/questions/2279851/applied-probability-bayes-theorem/2279888#2279888 – Ethan Bolker Jun 03 '18 at 14:03

1 Answers1

1

You made a mistake in claiming $P(Y|A) = 1 - P(Y|B)$. This is not how conditional probability works. It should be $P(Y|A) = 1 - P(G|A)$. I hope this helps!