Grab Bag
Overview
Grab bags are distributions with a limited count for each item. They are best visualized as a 'bag' of items; imagine a physical bag containing balls of different colors. Sampling from a Grab Bag is like removing a single ball from that bag.
Example
Suppose we have a bag of 10 balls:
Distribution A (Grab Bag) | ||
---|---|---|
Color | Count | Probability |
Red | 3 | 30% (3 / 10) |
Blue | 2 | 20% (2 / 10) |
Green | 5 | 50% (5 / 10) |
Suppose we sample from the Grab Bag and receive a Red ball. Afterwards, the Grab Bag looks like this:
Distribution B (After Sampling Red) | ||
---|---|---|
Color | Count | Probability |
Red | 2 | 22.2% (2 / 9) |
Blue | 2 | 22.2% (2 / 9) |
Green | 5 | 55.5% (5 / 9) |
Suppose we sampled twice more and received Red each time:
Distribution B (After Sampling Red x2) | ||
---|---|---|
Color | Count | Probability |
Red | 0 | 0% (0 / 7) |
Blue | 2 | 28.6% (2 / 7) |
Green | 5 | 71.4% (5 / 7) |
We have sampled all of the red balls, meaning they are now ineligible.
Advanced
Eligibility
Weight > 0 (Weight == Count for Grab Bags).