Let's say you have 5 independent tries at something with a probabiliy p of success on each try (and a probability q of failure), and you want to know what's the probability that you get exactly 2 successes.

You can imagine the outocme of the 5 trials as a sequence of 0's for failures and 1's for successes. The string 11000 means you succeeded on the first two tries and then failed on the next 3 tries. Well, that satisfies the requrement for exactly 2 successes, doesn't it? What's the probability of that sequence occurring? The first try needs to be a success (probability p), then the second needs to be a success (proability p), then the third needs to be a failure (probability q), then the fourth needs to be a failure (probability q), then the fifth needs to be a failure (probability q).

Key fact #1: If two events A and B are independent, then $P(A \cap B) = P(A)*P(B)$

Therefore, the probability of the sequence 11000 occurring is $ppqqq = p^{2}q^{3}$.

But that's only one particular sequence that saisfies the requirement. There are many such sequences. Such as 10100, 10010, and so on. Notice that each such sequence has the same probability of occurring. $ppqqq = pqpqq = pqqpq$ (and so on) are all equal to $p^{2}q^{3}$.

Is there a way to count how many such sequences there are? Imagine 5 blank slots and we want to put a 1 in exactly 2 of them (and then a 0 automatically goes in the 3 slots we didn’t choose). There are exactly ${5\choose2}$ ways to do that, where ${n \choose x} = \frac{n!}{(n-x)!x!}$

Key fact #2: if two events A and B are mutually exclusive, then $P(A \cup B) = P(A)+P(B)$

You can’t have the outcome of 11000 *and* the outcome of 10100. These events are mutually exclusive. Therefore the probability we get *one* of the outcomes that we want is equal to the sum of each outcome’s individual probability.

We know that each individual probability is $p^{2}q^{3}$, and we know that there are ${5\choose2}$ such probabilities that we’re adding together.

Therefore, the probability of exactly 2 successes in 5 tries is $p^{2}q^{3} + p^{2}q^{3} + p^{2}q^{3} + … {5\choose2}$ times, which is equal to ${5\choose2} p^{2}q^{3}$