Given 4 boxes, one is chosen out of random and 1 marble out of it.

Let $E_1$ be the event that the red marble was selected from Box A, $E_2$ be the event that the red marble was selected from Box B, $E_3$ be the event that the red marble was selected from Box C and $E_4$ be the event that the red marble was selected from Box D.

P (choosing any one of the boxes) = P ($E_1$) = P ($E_2$) = P ($E_3$) = P ($E_4$) = $\large\frac{1}{4}$

$E_1, E_2, E_3.....E_n$ are a set of mutually exclusive and exhaustive events, so we can use Bayes Theorem to caclulate the conditional probability that given the marble was red, it was calculate from a particular box, $P\left(\large \frac{E_i}{E}\right ) = \Large \frac{P\left(\frac{E}{E_i}\right ). P(E_i)} {\sum_{i=1}^{n} (P\left(\frac{E}{E_i}\right ).P(E_i))}$, where $E$ is the event that the marble is red.

Let us first caculate $P \large(\frac{E}{E_i})$:

$P \large(\frac{E}{E_1}) = \frac{1}{1+6+3} = \frac{1}{10}$

$P \large(\frac{E}{E_2}) = \frac{6}{6+6+2} = \frac{6}{10}$

$P \large(\frac{E}{E_3}) = \frac{8}{8+1+1} = \frac{8}{10}$

$P \large(\frac{E}{E_4}) = \frac{0}{0+6+4} = $$0$

1) P (that it was drawn from box A):

$P\left(\large \frac{E_1}{E}\right ) = \Large \frac{P\left(\frac{E}{E_1}\right ). P(E_1)} {\sum_{i=1}^{4} (P\left(\frac{E}{E_i}\right ).P(E_i))}$,

\(=\large\;\frac{\frac{1}{4}\;\times\;\frac{1}{10}}{\large \frac{1}{4}\;\times\large\;\frac{1}{10}\;+\;\frac{1}{4}\;\times\;\frac{6}{10}\;+\;\frac{1}{4}\;\times\;\frac{8}{10}\;+\;\frac{1}{4}\;\times\;0}\)

=\(\large\;\frac{1}{15}\)

2) P (that it was drawn from box B):

$P\left(\large \frac{E_2}{E}\right ) = \Large \frac{P\left(\frac{E}{E_2}\right ). P(E_2)} {\sum_{i=1}^{4} (P\left(\frac{E}{E_i}\right ).P(E_i))}$,

=\(\large\;\frac{\frac{1}{4}\;\times\;\frac{6}{10}}{\large\frac{1}{4}\;\times\;\frac{1}{10}\;+\;\frac{1}{4}\;\times\;\frac{6}{10}\;+\;\frac{1}{4}\;\times\;\frac{8}{10}\;+\;\frac{1}{4}\;\times\;0}\)

=\(\large\;\frac{\frac{1}{4}\;\times\;\frac{6}{10}}{\large\frac{1}{4}\;\times\;\frac{1}{10}\;+\;\frac{1}{4}\;\times\;\frac{6}{10}\;+\;\frac{1}{4}\;\times\;\frac{8}{10}\;+\;\frac{1}{4}\;\times\;0}\)

=\(\large\:\frac{6}{15}=\frac{2}{5}\)

3) P (that it was drawn from box C):

$P\left(\large \frac{E_3}{E}\right ) = \Large \frac{P\left(\frac{E}{E_3}\right ). P(E_3)} {\sum_{i=1}^{4} (P\left(\frac{E}{E_i}\right ).P(E_i))}$,

\(=\large\;\frac{\frac{1}{4}\;\times\;\frac{8}{10}}{\large\frac{1}{4}\;\times\;\frac{1}{10}\;+\;\frac{1}{4}\;\times\;\frac{6}{10}\;+\;\frac{1}{4}\;\times\;\frac{8}{10}\;+\;\frac{1}{4}\;\times\;0}\)

=\(\large\;\frac{8}{15}\)