+ Reply to Thread
Results 1 to 5 of 5

A better chance

  1. #1
    Registered User
    Join Date
    09-12-2005
    Posts
    2

    A better chance

    Hi

    I need to create a long list of 0 and 1 randomly generated, but one number should have a slightly better chance of showing up, say like 0.5%.

    I figured out the =RANDBETWEEN(0,1) but not how to give a better odd for one number.

    Can it be done?

    Thanks,

    Leo.

  2. #2
    Mike
    Guest

    RE: A better chance

    Maybe an IF statement with if even number then recalc the random?

    "leo31773" wrote:

    >
    > Hi
    >
    > I need to create a long list of 0 and 1 randomly generated, but one
    > number should have a slightly better chance of showing up, say like
    > 0.5%.
    >
    > I figured out the =RANDBETWEEN(0,1) but not how to give a better odd
    > for one number.
    >
    > Can it be done?
    >
    > Thanks,
    >
    > Leo.
    >
    >
    > --
    > leo31773
    > ------------------------------------------------------------------------
    > leo31773's Profile: http://www.excelforum.com/member.php...o&userid=27179
    > View this thread: http://www.excelforum.com/showthread...hreadid=466820
    >
    >


  3. #3
    JE McGimpsey
    Guest

    Re: A better chance

    One way:

    =IF(RAND()<0.5025, 1, 0)

    should give about 49.75% 0's, 50.25% 1's.

    In article <[email protected]>,
    leo31773 <[email protected]>
    wrote:

    > Hi
    >
    > I need to create a long list of 0 and 1 randomly generated, but one
    > number should have a slightly better chance of showing up, say like
    > 0.5%.
    >
    > I figured out the =RANDBETWEEN(0,1) but not how to give a better odd
    > for one number.
    >
    > Can it be done?
    >
    > Thanks,
    >
    > Leo.


  4. #4
    JE McGimpsey
    Guest

    Re: A better chance

    And of course

    =--(RAND()<0.5025)

    works just as well without the function call.

    In article <[email protected]>,
    JE McGimpsey <[email protected]> wrote:

    > One way:
    >
    > =IF(RAND()<0.5025, 1, 0)
    >
    > should give about 49.75% 0's, 50.25% 1's.


  5. #5
    Registered User
    Join Date
    09-12-2005
    Posts
    2
    Thanks! I'll try that.

+ 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