Example 1. 10 Bernoulli trials are conducted with a success probability of $p$. Find the probability that there will be only two failures, and three successes between them.
Solution. The given event is caused by chains

| Nuuunuuuu | Uuunuuunu |
| :--- | :--- |
| unuuunuun | uuuunuunu |
| uunuunuun | uuuuunuun |

The probability of each such chain is $p^{8} q^{2}$, and the number of such chains is 6. Therefore, the required probability is $6 p^{8} q^{2}$.

Answer. $6 p^{8} q^{2}$.