Bag A= 20% Yellow, 10% Green
Bag B=13% Yellow, 20% Green
Someone gives you 1 yellow and 1 green M&M and says 1 is from Bag A and 1 is from Bag B. What's the probability the yellow is from bag A?
I assume it's $P(Y \cap A|G)$, which is the probability it's from bag A and Yellow given the other is green?
$P(G)=(1/10)(1/2)+(1/5)(1/2)$
$P(A\cap Y)=(1/2)(1/5)$
$P(Y\cap A|G)=(1/10)/[(1/10)(1/2)+(1/5)(1/2)]$
This seems over simplistic, but I don't really know how else to calculate it. Seems like $Y$ should be in the conditioning rather than the posterior, but it's reliant on the M&M being yellow and from bag A.
Presumably the person drew one candy from each bag and we know one was yellow and one was green. The chance we got a yellow from A and a green from B is $0.2\cdot 0.2=0.04$. The chance we got a green from A and a yellow from B is $0.13 \cdot 0.1=0.013$. When we are told that one of these two events happened, the chance it was yellow from A and green from B is $$\frac {0.04}{0.04 + 0.013}=\frac {40}{53} \approx 0.7547$$