Example 2. Parts manufactured by two plants are stored in a warehouse. It is known that the production volume of the first plant exceeds the production volume of the second plant by 4 times. The probability of defect at the first plant is $p_{1}=0.05$, at the second plant - $p_{2}=0.01$. A randomly selected part turned out to be defective. What is the probability that this part was manufactured by the first plant?
Solution. Let $H_{1}$ be the event that the part taken is manufactured at the first plant, $H_{2}$ - at the second plant, then

$$
P\left(H_{1}\right)=\frac{4}{5}=0.8, P\left(H_{2}\right)=\frac{1}{5}=0.2
$$

Let $A$ be the event that a randomly taken part turned out to be defective.

According to the condition

$$
P\left(A / H_{1}\right)=0.05, P\left(A / H_{2}\right)=0.01
$$

In accordance with formula (1.10.1) in the case of $n=2$, we get

$$
P\left(H_{1} / A\right)=\frac{0.8 \cdot 0.05}{0.8 \cdot 0.05+0.2 \cdot 0.01}=0.952
$$