Example 1. The probability of hitting the target with one shot for a given shooter is 0.7 and does not depend on the shot number. Find the probability that exactly 2 hits will occur out of 5 shots.
Solution. Since $p=0.7$, then $q=1-p=1-0.7=0.3$. According to the condition $n=5, k=2$, using formula (3.1.1) we find

$$
P_{5}(2)=C_{5}^{2} p^{2} q^{5-2}=10 \cdot(0.7)^{2} \cdot(0.3)^{3}=10 \cdot 0.49 \cdot 0.027=0.1323
$$