Example 11. In a box, there are identical items manufactured by two machines: $40 \%$ of the items are made by the first machine, the rest - by the second. Defects in the production of the first machine constitute $3 \%$, of the second $-2 \%$. Find the probability that a randomly selected item will be defective.
Solution. Let $A$ be the event that a randomly selected item is defective; and let $H_{1}, H_{2}$ be the events that the item is manufactured by the first and second machine, respectively.

From the condition, it follows that

$$
\begin{aligned}
& P\left(H_{1}\right)=0.4, \quad P\left(H_{2}\right)=0.6, \quad\left(P\left(H_{2}\right)=1-P\left(H_{1}\right)\right) \\
& P\left(A / H_{1}\right)=0.03, \quad P\left(A / H_{2}\right)=0.02
\end{aligned}
$$

Formula (1.9.1) takes the form

$$
P(A)=P\left(H_{1}\right) P\left(A / H_{1}\right)+P\left(H_{2}\right) P\left(A / H_{2}\right)
$$

Substituting the corresponding values into this formula, we get

$$
P(A)=0.4 \cdot 0.03+0.6 \cdot 0.02=0.024
$$