# Posterior probability with Bins

For the following question I wanted to know how to estimate the probability that I have selected from bin A. There are 10 bins, 4 are labelled A, 6 labelled B. Each bin has balls with two colors (Red/ blue). The distribution of red and blue balls in bin A is (0.3 to 0.7) The distribution of red and blue balls in bin B is (0.7 to 0.3). If you randomly draw two balls with replacement and they turn out to be red and blue what is the probability we selected from A?

I am getting (Probability selecting red from any Bin that is A/ Total probability selecting red from all bins)X (Probability selecting blue from any bin that is A/ Total probability of selecting a blue from all bins) =13.7%

• Apologies for the 2nd copy of my Answer ('deleted'), which appeared after a browser crash. – BruceET Apr 24 at 3:29

## 2 Answers

Intuitively, the probability of getting exactly one Red ball out of two is the same, whether you sample from an urn labeled A or an urn labeled B. So getting exactly one Red ball provides no new information. Then the posterior probability of sampling from A $$[P(A|1)]$$ is unchanged from the prior probability $$[P(A) = 0.4].$$

From Bayes' Theorem (with somewhat abbreviated notation),

$$P(A|1) = \frac{P(A \cap 1)}{P(1)} = \frac{P(A \cap 1)}{P(A\cap 1)+P(B\cap1)}\\ =\frac{P(A)P(1|A)}{P(A)P(1|A)+P(B)P(1|B)}\\ = \frac{P(A)}{P(A) + P(B)} = P(A) = 0.4,$$ where the second equal sign uses the Law of Total Probability, and the last line uses the fact that $$P(1|A) = P(1|B).$$

For an example in which the prior and posterior probabilities differ, see this Q&A.

ok so if there are still 4 bins labelled A and 6 bins labelled B each with two balls: distribution of balls in A (0.1, 0.3, 0.2, 0.4) Red, Blue, White Black distribution of balls in B (0.4, 0.2, 0.3, 0.1) Red, Blue, White Black and again you pick from a bin and get one red and blue, the probability it is from a bin labelled A has to be much lower than 0.4 right?

• This appears to be a comment rather than an answer. You need to gain 10 reputation before you can comment. On what basis do you conclude BruceET's answer is too high? You should lay out clearly what way you conclude that 0.4 is too high. – ReneBt Apr 24 at 8:04
• sorry I have not used this platform. I posted it as a question. – EmA Apr 25 at 2:29
• See link at end of my answer, where this is resolved. – BruceET Apr 25 at 4:05