+ Reply to Thread
Results 1 to 3 of 3

Macro and probabilities

  1. #1
    Registered User
    Join Date
    03-31-2006
    Posts
    4

    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

  2. #2
    NickHK
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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. #3
    Registered User
    Join Date
    03-31-2006
    Posts
    4
    Thanks, I'm gonna try it right now...
    I'll tell you if it worked

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1