March 28, 2009

Do you want to play a game?

You put down some money and you roll a die between 1 and 100. Depending on your roll:

  • 1-50: I keep your money.
  • 51-65: You get your money back.
  • 66-75: You get 1.5 times your money (if you bet $1, you get $1.50)
  • 76-99: You get 2 times your money
  • 100: You get 3 times your money
Do you want to play?

Update: here is the solution

Posted by cedric at March 28, 2009 09:28 PM

Comments

nope...game is worth 81 cents by my count

Posted by: dkaz at March 28, 2009 10:14 PM

Not 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 76-100, 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 PM

Depends 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 AM

If 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 double-up 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 AM

Jesse, cool, you have an infinite pile of money to play with?

Posted by: Timothy Patrick Connor at March 29, 2009 10:53 AM

Yes, I would like to play...

#!/usr/bin/python

import random
import sys

TRIES = 1000000
BET = 1

otaku = 0
me = 0
while TRIES > 0:
TRIES -= 1
x = random.randint(1, 100)
if x = 51 and x = 66 and x = 76 and x <= 99:
me += 2 * BET
elif x == 100:
me += 3 * BET

print "otaku: %d, me: %d" % (otaku, me)

Posted by: mlbright at March 29, 2009 02:01 PM

My last comment didn't paste quite right.... But I still would like to play ...

Posted by: mlbright at March 29, 2009 02:04 PM

mlbright, there's an error in your calculation, can you spot it?

Posted by: Cedric at March 29, 2009 02:11 PM

mlbright, I am assuming that chunks of your code between less-than and greater-than 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
experiments = experiments -1
tries = 1000000

otaku = 0
me = 0

while tries > 0 do
tries = tries - 1
me = me -1
otaku = otaku +1
x = 1+rand(100)
if x >= 51 and x = 66 and x = 76 and x < 100:
me = me +2
otaku = otaku -2
elsif x == 100:
me = me +3
otaku = otaku -3
end
end

puts "I have #{me}, while you have #{otaku}"

end

#Results confirm my analytical solution

Posted by: Matthias at March 30, 2009 12:33 AM

I think I'd be better off playing roulette and betting on red/black.

Posted by: n at March 30, 2009 09:59 AM

I 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 PM
Post a comment






Remember personal info?