March 28, 2009Do you want to play a game?You put down some money and you roll a die between 1 and 100. Depending on your roll:
Update: here is the solution Comments
nope...game is worth 81 cents by my count Posted by: dkaz at March 28, 2009 10:14 PMNot quite. I'm too tired to do the proper math, but here's the intuitive argument... 50% of the time, you lose all your money. This means that to compensate, you must receive *at least* twice as much as you bet another 50% of the time just to stay even. Since this threshold 76100, I think it's safe to say that the game is weighted fairly heavily in favor of the house. This is assuming of course that you bet exactly the same amounts every time. Though, I suppose that over an infinite number of rolls, given these odds, it doesn't matter how much you bet, you're not going to get much of it back. Posted by: Daniel Spiewak at March 28, 2009 11:46 PMDepends if I want to deliberately lose money to you or not. I should on average loose 19 cents to you every time I play. Posted by: Chris at March 29, 2009 01:28 AMIf I get to play multiple times and there's no bet limit, I'll play. I'll just use the Martingale roulette system, wherein I doubleup each time I lose. Posted by: Jesse Wilson at March 29, 2009 01:56 AM>you roll a die I roll the die, not you? Excellent, let's go! Posted by: Alexis Kennedy at March 29, 2009 05:53 AMJesse, cool, you have an infinite pile of money to play with? Posted by: Timothy Patrick Connor at March 29, 2009 10:53 AMYes, I would like to play... #!/usr/bin/python import random TRIES = 1000000 otaku = 0 print "otaku: %d, me: %d" % (otaku, me) My last comment didn't paste quite right.... But I still would like to play ... Posted by: mlbright at March 29, 2009 02:04 PMmlbright, there's an error in your calculation, can you spot it? mlbright, I am assuming that chunks of your code between lessthan and greaterthan signs have been eaten by the comment system, however I think you may still have overlooked something important. Think about what your variables represent and what important invariant should exist between them after any round. Posted by: Weeble at March 29, 2009 03:40 PM#Version in ruby (Note that one variable me/otaku would suffice since this is symmetrical) experiments = 5 while experiments > 0 do otaku = 0 while tries > 0 do puts "I have #{me}, while you have #{otaku}" end #Results confirm my analytical solution Posted by: Matthias at March 30, 2009 12:33 AMI think I'd be better off playing roulette and betting on red/black. Posted by: n at March 30, 2009 09:59 AMI would play those odds..There's a 50% probability that I will win (I play 21 which is about 48%). Additionally my wins have a higher probability of being double the bet. Posted by: Sony Mathew at March 31, 2009 12:51 PMPost a comment
