The theoretical probability is defined as the ratio of the number of favourable outcomes to the number of possible outcomes.
The randomly generated list has the numbers from 1 to 5, therefore, the total amount of elements is 5, which is the number of possible outcomes.
Our event consists of choosing from this list any of the numbers from 1 to 4, which is a total of 4 elements, which represents the number of favourable outcomes.4
Their ratio is:
Rewritting this ratio as a percentage, we have:
The answer is option B.