Example 7. At two automatic machines, identical parts are manufactured. It is known that the productivity of the first machine is twice that of the second, and that the probability of producing a part of the highest quality on the first machine is 0.9, and on the second - 0.81. Parts manufactured during the shift on both machines are unsorted and are stored in the warehouse. Find the probability that a randomly taken part will be of the highest quality.
Solution. Let $A$ be the event that a randomly selected part will turn out to be of the highest quality. Event $A$ can occur with one of the following hypotheses: $H_{1}$ - "the part is manufactured on the first machine", $H_{2}$ - "the part is manufactured on the second machine".

Since the productivity of the first machine is twice that of the second, then

$$
P\left(H_{1}\right)=\frac{2}{3}, \quad P\left(H_{2}\right)=\frac{1}{3}
$$

From the condition of the problem, it follows that

$$
P\left(A / H_{1}\right)=0.9, \quad P\left(A / H_{2}\right)=0.81
$$

In accordance with formula (1.9.1), which for $n=2$ 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)
$$

we find

$$
P(A)=\frac{2}{3} \cdot 0.9+\frac{1}{3} \cdot 0.81=0.6+0.27=0.87
$$