Example 7. At an enterprise, products of a certain type are manufactured on three production lines. The first line produces $30 \%$ of the products from the total production volume, the second line - $25 \%$, and the third line - the remaining part of the production. Each line is characterized by the following percentages of quality: $97 \%, 98 \%, 96 \%$. A randomly selected product, produced by the enterprise, turned out to be defective. Determine the probabilities that this product was manufactured on the first, second, and third lines.
Solution. Let's introduce the following notations: $A$ - the event that a randomly selected item is defective; $H_{1}, H_{2}, H_{3}$ - hypotheses that the item was manufactured on the first, second, and third lines, respectively.

According to the problem statement, we have:

$$
\begin{aligned}
& P\left(H_{1}\right)=0.30 ; \quad P\left(H_{2}\right)=0.25 ; \quad P\left(H_{3}\right)=0.45 \\
& P\left(A / H_{1}\right)=0.03, \quad P\left(A / H_{2}\right)=0.02, \quad P\left(A / H_{3}\right)=0.04
\end{aligned}
$$

By the formula of total probability, we get

$$
P(A)=0.30 \cdot 0.03 + 0.25 \cdot 0.02 + 0.45 \cdot 0.04 = 0.032.
$$

According to Bayes' formulas, we find the required probabilities:

$$
\begin{aligned}
& P\left(H_{1} / A\right)=\frac{P\left(H_{1}\right) P\left(A / H_{1}\right)}{P(A)}=\frac{0.30 \cdot 0.03}{0.032}=0.281 \\
& P\left(H_{2} / A\right)=\frac{P\left(H_{2}\right) P\left(A / H_{2}\right)}{P(A)}=\frac{0.25 \cdot 0.02}{0.032}=0.156 \\
& P\left(H_{3} / A\right)=\frac{P\left(H_{3}\right) P\left(A / H_{3}\right)}{P(A)}=\frac{0.45 \cdot 0.04}{0.032}=0.563
\end{aligned}
$$