A bag contains 4 red and 4 black balls, another bag contains 2 red and 6 black balls. One of the two bags is selected at random and a ball is drawn from the bag which is found to be red. Find the probability that the ball is drawn from the first bag.
Let E1 and E2 be the events of selecting first bag and second bag respectively
$\therefore \mathrm{P}\left(\mathrm{E}_{1}\right)=\mathrm{P}\left(\mathrm{E}_{2}\right)=\frac{1}{2}$
Let A be the event of getting a red ball.
$\Rightarrow \mathrm{P}\left(\mathrm{A} \mid \mathrm{E}_{1}\right)=\mathrm{P}($ drawing a red ball from first bag $)=\frac{4}{8}=\frac{1}{2}$
$\Rightarrow \mathrm{P}\left(\mathrm{A} \mid \mathrm{E}_{2}\right)=\mathrm{P}($ drawing a red ball from second bag $)=\frac{2}{8}=\frac{1}{4}$
The probability of drawing a ball from the first bag, given that it is red, is given by $P\left(E_{2} \mid A\right)$.
By using Bayes’ theorem, we obtain
$P\left(E_{1} \mid A\right)=\frac{P\left(E_{1}\right) \cdot P\left(A \mid E_{1}\right)}{P\left(E_{1}\right) \cdot P\left(A \mid E_{1}\right)+P\left(E_{2}\right) \cdot P\left(A \mid E_{2}\right)}$
$=\frac{\frac{1}{2} \cdot \frac{1}{2}}{\frac{1}{2} \cdot \frac{1}{2}+\frac{1}{2} \cdot \frac{1}{4}}$
$=\frac{\frac{1}{4}}{\frac{1}{4}+\frac{1}{8}}$
$=\frac{\frac{1}{4}}{\frac{3}{8}}$
$=\frac{2}{3}$