To add a random selector to a schedule:
Think of yourself as a "random selector." You are blindfolded, and you have a bucket that contains 10 red balls and 10 green balls. You have a 50% chance of picking a red ball, and a 50% chance of picking a green ball. You pick a ball randomly—it is red. You then replace the ball in the bucket. Every time you pick a ball, you have a 50% chance of getting a red ball. Because the ball is replaced after each selection, the bucket always contains 10 red balls and 10 green balls. It is even possible (but unlikely) that you will pick a red ball every time.
Assume that a random selector contains two tests: Browse and Bid. You assign Browse a weight of 7 and Bid a weight of 3. Each time the loop is processed, Browse has a 70% chance of being selected, and Bid has a 30% chance of being selected.
For example, assume a selector contains six blocks set to the following weight:
Weight of block | Likelihood of block being selected |
---|---|
1 (two blocks) | 1/23. = 0.0435, or about 4.35% (for each block) |
2 | 2/23 = 0.0870, or about 8.70% |
5 (two blocks) | 5/23 = 0.2174, or about 21.74% (for each block) |
9 | 9/23 = 0.3913, or about 39.13% |