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
#1 by dkaz on March 28, 2009 - 10:14 pm
nope…game is worth 81 cents by my count
#2 by Daniel Spiewak on March 28, 2009 - 11:46 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.
#3 by Chris on March 29, 2009 - 1:28 am
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.
#4 by Jesse Wilson on March 29, 2009 - 1:56 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.
#5 by Alexis Kennedy on March 29, 2009 - 5:53 am
>you roll a die
I roll the die, not you? Excellent, let’s go!
#6 by Timothy Patrick Connor on March 29, 2009 - 10:53 am
Jesse, cool, you have an infinite pile of money to play with?
#7 by mlbright on March 29, 2009 - 2:01 pm
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)
#8 by mlbright on March 29, 2009 - 2:04 pm
My last comment didn’t paste quite right…. But I still would like to play …
#9 by Cedric on March 29, 2009 - 2:11 pm
mlbright, there’s an error in your calculation, can you spot it?
#10 by Weeble on March 29, 2009 - 3:40 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.
#11 by Matthias on March 30, 2009 - 12:33 am
#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
#12 by n on March 30, 2009 - 9:59 am
I think I’d be better off playing roulette and betting on red/black.
#13 by Sony Mathew on March 31, 2009 - 12:51 pm
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.