Macro and probabilities

  • Thread starter Thread starter MrKermit
  • Start date Start date
M

MrKermit

Hello,
I explain my problem:
I have multiples events, each one with a occurence probability (ex;
event A: 20%, event B: 40%, event C: 10%, event D: 30%)
I need to create a list of values with my events, respecting the
probabilities (ex: creating a list of 100 values, in a aleatory order;
with 20 A, 40 B, 10 C and 30D)

The thing is that it has to be random, and for a veeery big list (about
9000 entries)

Is there a simple way to do it with excel macros, or should I try it
another way?

Thanks a lot
 
MrKermit,
One way that comes to mind:
- make sure the list has a sequential number column
- insert another column of random number
- sort by that column
- delete that column
- assign the top 20% rows to A, then 40% to B, etc..
- sort by the sequential number column.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top