Example 2. In an urn, there are 40 balls: 15 blue, 5 green, and 20 white. What is the probability that a colored ball will be drawn from the urn?
Solution. Extracting a colored ball means the appearance of either a blue or a green ball. The probability of extracting a blue ball (event $A$): $P(A)=15 / 40=3 / 8$. The probability of extracting a green ball (event $B$): $P(B)=5 / 40=1 / 8$. Since events $A$ and $B$ are mutually exclusive, we obtain by formula (1.8.2)

$$
P(A+B)=P(A)+P(B)=\frac{3}{8}+\frac{1}{8}=\frac{1}{2}
$$

Remark. The same result is obtained directly by the formula $P(C)=\frac{m}{n}=\frac{20}{40}=\frac{1}{2}$, where $\dot{C}$ - "appearance of a colored ball"; this event is favorable to 20 elementary outcomes.