Example 6.14. There are three batches of parts, each containing 30 parts. The number of standard parts in the first, second, and third batches is $20, 15, 10$, respectively. A part is randomly drawn from a randomly selected batch and turns out to be standard. Then, a second part is randomly drawn from the same batch and also turns out to be standard. Find the probability that the parts were drawn from the third batch.
Solution. Let $A$ be the event that a standard part was drawn in each of the two trials.

We can make three assumptions (hypotheses): $H_{1}$ - parts were drawn from the first batch; $H_{2}$ - parts were drawn from the second batch; $H_{3}$ - parts were drawn from the third batch.

Since the parts were drawn from a randomly selected batch, the probabilities of the hypotheses are equal:

$$
P\left(H_{1}\right)=P\left(H_{2}\right)=P\left(H_{3}\right)=\frac{1}{3} \text {. }
$$

Let's find the conditional probability $P_{H_{1}}(A)$, i.e., the probability that two standard parts will be drawn sequentially from the first batch:

$$
P_{H_{1}}(A)=\frac{20}{30} \cdot \frac{19}{29}=\frac{38}{87}
$$

Let's find the conditional probability $P_{H_{2}}(A)$, i.e., the probability that two standard parts will be drawn sequentially (without replacement) from the second batch:

$$
P_{H_{2}}(A)=\frac{15}{30} \cdot \frac{14}{29}=\frac{7}{29}
$$

Let's find the conditional probability $P_{H_{3}}(A)$, i.e., the probability that two standard parts will be drawn sequentially from the third batch:

$$
P_{H_{3}}(A)=\frac{10}{30} \cdot \frac{9}{29}=\frac{3}{29}
$$

The desired probability that both drawn standard parts are from the third batch, according to Bayes' formula, is:

$$
\begin{gathered}
P_{A}\left(H_{3}\right)=\frac{P\left(H_{3}\right) \cdot P_{H_{3}}(A)}{P\left(H_{1}\right) \cdot P_{H_{1}}(A)+P\left(H_{2}\right) \cdot P_{H_{2}}(A)+P\left(H_{3}\right) \cdot P_{H_{3}}(A)}= \\
=\frac{\frac{1}{3} \cdot \frac{3}{29}}{\frac{1}{3} \cdot \frac{38}{87}+\frac{1}{3} \cdot \frac{7}{29}+\frac{1}{3} \cdot \frac{3}{29}}=\frac{\frac{1}{29}}{\frac{68}{261}}=\frac{9}{68} .
\end{gathered}
$$

## 6.2. Scheme of Repeated Trials