I have a list of items with frequencies:
Item1 58%
Item2 14%
Item3 10%
Item4 8%
Item5 5%
Item6 5%
I want to randomly choose one of these items, 1000 times for example, and have the frequencies each item was chosen match the stated frequencies, more closely as the number of selections grows. How can I do that?
I want to avoid jumping to solutions quickly in case Rand( ) functions in given languages don't behave as expected.
Is there a standard way? I am quite happy (keen in fact) to learn some new maths if necessary to achieve this.
Thx
Aucun commentaire:
Enregistrer un commentaire