Jump to content

Coin Flip Percentages


rogue482

Recommended Posts

you have

heads = heads++;

if you do heads++ don't do the "heads =" part. it should be just

heads++;

should work with that change. I didn't catch that the first time through.

Edited by flareback

Share this post


Link to post
Share on other sites

  • 1 month later...
no it's actually ok with the <= 5 because that only applies to .500000000000000000 nothing bigger. granted < 5 would be better, but <+ doesn't really skew the results

 

Um no it's not okay, you're skewing the results. (I'm not sure how you come to the conclusion that you're NOT skewing them, to be honest.) Heads and tails should have an equal chance to show up, <= 0.5 means that one has a higher chance of showing than the other, which is inaccurate. It's pretty basic maths. For it to be even you'd need:

 

0.0000 - 0.4999 = heads

0.5000 - 0.9999 = tails

 

This way, each side has 5000 possible ways to win, instead of your suggested approach which would give heads 5001 ways to win and tails 4999 ways to win. 5001/4999 != 50/50.

Edited by gnack

Share this post


Link to post
Share on other sites

This way, each side has 5000 possible ways to win, instead of your suggested approach which would give heads 5001 ways to win and tails 4999 ways to win. 5001/4999 != 50/50.

Old thread and I don't think it really matters anyway! He was flipping coins, not deciding the faith of the universe :P

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...