In your example, the "choice" generator would be Bernoulli(.88), which
would choose between the "good-widgets" and "bad-widgets" generator.'
Well, okay. But to handle more than two sources, we need a variant of Bernouilli that accepts N - 1 weights to return values from 1 to N (and in all other cases returns 0). I suppose that would be feasible. Is there a name for this?
One advantage of allowing arbitrary totals is that the weights can be fixnums rather than fractions or flonums: weights of (1 2 3 4) gives a precise weighting of 1/10 for 0, 1/5 for 1, 3/10 for 2, and 2/5 for 3. In this case the weight of 0 must be given explicitly.
John Cowan
http://vrici.lojban.org/~cowan xxxxxx@ccil.orgAnd now here I was, in a country where a right to say how the country should
be governed was restricted to six persons in each thousand of its population.
For the nine hundred and ninety-four to express dissatisfaction with the
regnant system and propose to change it, would have made the whole six
shudder as one man, it would have been so disloyal, so dishonorable, such
putrid black treason. --Mark Twain's Connecticut Yankee