I want to choose randomly* between two alternatives with unequal probability.
For instance, when the user presses a button, 25% of the time it would make sound A and 75% of the time, sound B. I can manually do easy ratios like 1:4 and 2:4 but I'm having trouble with ratios like 3:5.
What is the generic way to think about this?
*I mean unpredictable when looked at one-by-one. I notice any question with the word random in it gets a Mensa of pedants.