Another way to do this would be to do an interval of 0, 1 and check based on floating point numbers, which might be clearer; you can store the probabilities in variables that way.