Hi - here is my question.
I have a list of numbers from which I would like to generate a random draw, however the numbers are typically drawn with a particular frequency (not of equal probability).
For example: number 1 is drawn with 0.05 (out of 1) probability, 2 is drawn 0.1 prob, 3 is 0.15, 4 is 0.2, 5 is 0.05, 6 is 0.05, 7 is 0.12, 8 is 0.08, 9 is 0.01 and 10 is 0.19.
So I multiplied the probability by 100 to get a whole number, which would equal draws out of 100, and then generate a list of numbers based on these whole numbers - instead of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 (which are all of equal probability), the list would be weighted like this: 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, etc... in a list of 100 numbers. Then I could use a randbetween(1, 100) generate a list and use INDEX to get the corresponding drawn number.
Is there a way to generate that column of 100 numbers? Or if it is 1000 numbers, is there a function to generate these numbers?
I hope I am explaining this properly.
Cheers,
Robin
Bookmarks