I am creating a set of items and with each I am counting its number of occurrences in a sample. Later I wish to choose an item at random but I want the chance of choosing any particular item to be equal to the number of occurrences as compared to the total of all occurrences of all items.
I believe I have found a nice solution but I'm interested what the standard term for this concept is and what the standard methods of achieving it are.