From: Chris Pine Date: 2003-04-20T13:42:13+09:00 Subject: Re: Biased weighted random? ----- Original Message ----- From: "Daniel Carrera" If you keep the ratios constant, the probabilities *must* change. Take ---------------------------- Yes, that's what we've been saying. That's why your algorithm doesn't work. The idea was to have the *long-term* probabilities be according to the weights. ---------------------------- If on the first trial I select event 1, and I don't want repetitions, then the new probability of event 1 is 0. If we keep the ratio between the probabilities of events 2 and 3 constant, then necessarily the new probabilities are: event 1 has prob 0 event 2 has prob .5 event 3 has prob .5 ---------------------------- *Long-term* probabilities... this is just the probabilities at one step. ---------------------------- As for Hal's experiment, the sample was too small to be statistically significant (it was small enough to fit in a couple of lines). You will almost never see that kind of "perfect" distribution. That kind of distribution is not representative of what a typical random distribution. ---------------------------- Not statistically significant?! He ran it 200,000 times! The probabilities were clearly converging: 200: {"a"=>73, "b"=>61, "c"=>41, "d"=>25} 2000: {"a"=>700, "b"=>608, "c"=>449, "d"=>243} 20000: {"a"=>6842, "b"=>6064, "c"=>4492, "d"=>2602} 200000: {"a"=>68441, "b"=>60009, "c"=>45798, "d"=>25752} You said yourself that the long-term probabilities were different from those suggested by the *desired* weightings (in this case 8, 6, 4, and 2); so we are all agreed that that algorithm doesn't work. I'm not sure what you are trying to say. Chris