in reply to Drawing samples from a set
you could generate a weighted list and random a number that is in the range of 0 - (n-1) where n is the max index. This aproch has some overhead of generating the array each change of the probabilities but is efficiant in doing the lookup. in your example the array would contain 1,1,2,2,2,3,3,3,3,3 and the random number generated would be 0 - 9 when used as an index it would give you a weighted chance to pull a 3 50% of the time.
-Waswas