r represents the number of objects we select from a set of objects.
A formula for the number of possible combinations of r objects from a set of n objects is C=n!/r!(n-r)!
So, if we wish to compute the probability of 3 successes out of 18 trials. In this case, r =3 . (we select 3 from 18 trials). And n=18.