Example 4. In a group of 21 students, including 5 excellent students, 10 well-performing students, and 6 poorly performing students. On the upcoming exam, excellent students can only receive excellent grades. Well-performing students can receive good or excellent grades with equal probability. Poorly performing students can receive good, satisfactory, or unsatisfactory grades with equal probability. One student is randomly invited to take the exam. Find the probability that he will receive a good or excellent grade (event $A$).
Solution. Let's denote the hypotheses: $H_{1}$ - "an excellent student is invited", $H_{2}$ - "a good student is invited", $H_{3}$ - "a weak student is invited".

From the problem statement, it follows that

$$
\begin{aligned}
& P\left(H_{1}\right)=\frac{5}{21}, P\left(H_{2}\right)=\frac{10}{21}, P\left(H_{3}\right)=\frac{6}{21}=\frac{2}{7} \\
& P\left(A / H_{1}\right)=1, P\left(A / H_{2}\right)=1, P\left(A / H_{3}\right)=\frac{1}{3}
\end{aligned}
$$

Using formula (1.9.1), 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)= \\
& =\frac{5}{21} \cdot 1+\frac{10}{21} \cdot 1+\frac{2}{7} \cdot \frac{1}{3}=\frac{17}{21} \approx 0.81
\end{aligned}
$$