Concept:
Suppose we have a string of length n and we want to generate all combinations/permutations taken r at a time with/without repetition, then the possibilities for different cases are given below.
1. Combinations without repetitions = \({n_{{C_r}}}\)
2. Combinations with repetitions = \({\left( {n + r - 1} \right)_{{C_r}}}\)
3. Permutations without repetitions = \({n_{{P_r}}}\)
4. Permutations with repetitions = nr
Calculation:
In the given question, the total number of colors available (n) = 4
Number colors have taken at a time (r) = 3
Total numbers of cases for picking any three pens are
Total number of combinations = \({\left( {n + r - 1} \right)_{{C_r}}} = {6_{{C_3}}} = 20\)
Number of cases where all three pens have the same color = 4 (all 3 black pens + all 3 blue pen + all 3 green pen + all 3 red pen)
Required probability \(=\frac{4}{20}=0.2\)