Results 1 to 34 of 34

Thread: [2008] How to achieve true 50/50 chance?

Threaded View

  1. #1

    Thread Starter
    Fanatic Member arsmakman's Avatar
    Join Date
    Dec 2001
    Location
    Leiden, Netherlands.
    Posts
    719

    Resolved [2008] How to achieve true 50/50 chance?

    I know I'm being quite pedantic here. But, what is the right way to get a true 50/50-chance with a generated random number? Say, to simulate the flip of a coin.

    This is what I mean:
    Code:
    Randomize()
    
    If Rnd() > .5 Then Debug.Print("Heads") Else Debug.Print("Tails")
    If Rnd() >= .5 Then Debug.Print("Heads") Else Debug.Print("Tails")
    Which of these two is the right one?

    I know this difference is close to nothing, but I'm doing some calculations on bell curves, in such a way that it requires true 50/50-chance.

    Thanks for any help,
    Alexander.
    Last edited by arsmakman; Feb 11th, 2009 at 02:03 PM. Reason: Resolved
    No matter how fool-proof your program is, there will always be a better fool.

    Was a post helpful to you? Rate it!

Posting Permissions

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



Click Here to Expand Forum to Full Width