Final answer:
The probability of randomly selecting a yellow pencil is 1/2.
Step-by-step explanation:
In the given problem, the probability of randomly selecting a red pencil is 2 and the probability of randomly selecting a blue pencil is 1-2. To find the probability of randomly selecting a yellow pencil, we need to subtract the sum of the probabilities of selecting a red pencil and a blue pencil from 1. So, the probability of randomly selecting a yellow pencil is 1 - 2 - 1/2 = 1/2.