The Bayesian Bag

Three bags, each containing ten balls, with the following combinations:
1) 3 red, 7 black
2) 8 red, 2 black
3) 4 red, 6 black
One of the bags is randomly selected, and a ball is drawn. If the ball drawn is red, what is the probability that it is taken from the third bag?

Use Bayes’ equation to get the answer:

\\ P(3|R) = \frac{P(R|3) * P(3)}{P(R|3) * P(3) + P(R|1) * P(1) * P(R|2) * P(2)} \\ \\ = \frac{(4/10) * (1/3)}{(4/10) * (1/3) + (3/10) * (1/3) + (8/10) * (1/3)} = \frac{4/30}{15/30} = \frac{4}{15}