Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro and probabilities


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
------------------------------------------------------------------------
MrKermit's Profile: http://www.excelforum.com/member.php...o&userid=33021
View this thread: http://www.excelforum.com/showthread...hreadid=528467

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Macro and probabilities

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

"MrKermit" wrote in
message ...

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
------------------------------------------------------------------------
MrKermit's Profile:

http://www.excelforum.com/member.php...o&userid=33021
View this thread: http://www.excelforum.com/showthread...hreadid=528467



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro and probabilities


Thanks, I'm gonna try it right now...
I'll tell you if it worked


--
MrKermit
------------------------------------------------------------------------
MrKermit's Profile: http://www.excelforum.com/member.php...o&userid=33021
View this thread: http://www.excelforum.com/showthread...hreadid=528467

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic Probabilities UDF Function Help Joe Smith03 Excel Worksheet Functions 3 March 3rd 11 08:52 PM
Calculating probabilities Raul Sousa Excel Worksheet Functions 9 October 19th 09 06:44 PM
Calculating Probabilities Daisy Excel Worksheet Functions 3 March 3rd 08 08:01 PM
Question about use of Poisson probabilities Dora Smith Excel Worksheet Functions 1 February 4th 07 07:09 PM
Question about use of Poisson probabilities Dora Smith Excel Discussion (Misc queries) 4 February 4th 07 06:30 PM


All times are GMT +1. The time now is 01:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"