Originally Posted by
laserlight
Think about picking one of four restaurants to eat at for lunch using a single roll of a six-sided die: if you use the entire range of the die using modulo, then two of the restaurants will be twice as likely to be selected as the other two. For example, restaurant A will be selected if the die roll is 1 or 5, restaurant B will be selected if the die roll is 2 or 6, but restaurant C will only be selected if the die roll is 3, and restaurant D will only be selected if the die roll is 4. A simple solution to this is to discard the roll if it is 5 or 6, i.e., re-roll the die such that you only pick a random number within a range congruent to the number of options.