Example 10. 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 produces the remaining part of the products. Each line is characterized by the following percentages of good products: $97 \%, 98 \%, 96 \%$. Determine the probability that a randomly selected product, produced by the enterprise, will be defective.
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 produced on the first, second, and third production lines, respectively.

First, note that 45% of the items are produced on the third line from the total production volume. 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}
$$

Using the formula for total probability (1.9.1) for the case $n=3$, we find the desired probability

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

The probability that a randomly selected item will be defective is $3.2\%$.