I had an idea for a new Craps prop bet and was trying to write some Python code that would simulate the bet, but ran into an issue.
My assumption was that if you flipped the rules of a bet and you flipped the payouts of the bet the house edge on that new hypothetical bet could be expressed by simply changing the sign of the house edge on the original bet.
Say you turned the hard 8 bet into a lay the hard 8 bet. You win on 7 or easy 8 before the next hard 8. You’re essentially acting like the casino at that point and the payouts go from 9:1 to 1:9. Shouldn’t the house edge on this new hypothetical bet be -9.09% since the house edge on hard 8 is 9.09%?
To test my assumption, I ran a 10 million round simulation of the traditional hard 8 bet and laying the hard 8 and was surprised to find that while the original hardway bet did show a house edge of ~ 9%, laying the hard 8 showed a house edge of ~ -1%.
I’m trying to determine if the mistake I’ve made is in the assumption that a house edge flips if you flip the payouts and the rules of the bet or if the mistake I’ve made is in the Python code I’ve written.
Any thoughts?
import random as r
def hard_eight(bet):
while 1==1:
die1=r.randint(1,6)
die2=r.randint(1,6)
if (die1==4) and (die2==4):
return bet * 9.0
elif ((die1 + die2) == 8) or ((die1 + die2) == 7):
return bet * -1.0
def lay_hard_eight(bet):
while 1==1:
die1=r.randint(1,6)
die2=r.randint(1,6)
if (die1==4) and (die2==4):
return bet * -1.0
elif ((die1 + die2) == 8) or ((die1 + die2) == 7):
return bet / 9.0
wagered = 0.0
winnings = 0.0
i = 0
while i < 10000000:
wagered += 1.0
winnings += hard_eight(1.0)
i += 1
player_return = 'Hard eight player edge: ' + str(round((winnings/wagered)*100,2)) + '%'
print player_return
wagered = 0.0
winnings = 0.0
i = 0
while i < 10000000:
wagered += 1.0
winnings += lay_hard_eight(1.0)
i += 1
player_return = 'Lay hard eight player edge: ' + str(round((winnings/wagered)*100,2)) + '%'
print player_return
Returns:
Hard eight player edge: -9.11%
Lay hard eight player edge: 0.98%
Your mistake is, while you are "acting like the casino" when you lay the bet, the casino is betting 1/9 against your 1, rather than 1 against your 9, but your house edge is based on your bet rather than the casino's.
If the casino has a 9% advantage on a hard 8, surely the player would have a 9% advantage if they could book the same exact bet as the casino, right? Putting my $9 up against the casino's $1 (which is the same scenario that plays out on a standard hard 8 bet, just reversed) is the same as putting my $1 up against the casino's $(1/9).
if you only had to put up $9 I agree that the player would get the casino's exact edge for himself
in any case that has to be the most unheard of bet in a casino - to take the large end of the bet. I can't think of anything like that for the moment
I take it back, the most unheard of thing is to intentionally allow a bet with a player edge
Quote: ewoks4lifeI'm sorry but I really don't understand what you mean. Are you saying that this bet really would only be an advantage of 1% if the player could make it? I don't see how that could be.
If the casino has a 9% advantage on a hard 8, surely the player would have a 9% advantage if they could book the same exact bet as the casino, right? Putting my $9 up against the casino's $1 (which is the same scenario that plays out on a standard hard 8 bet, just reversed) is the same as putting my $1 up against the casino's $(1/9).
"House Edge" is actually a bit of a misnomer.
The casino isn't betting $1 against your $1. The casino is betting $9 against your $1. You just have a 9% disadvantage.
The casino has a 1% or so advantage on their $9 bet. You have a 9% (or so) disadvantage on your $1 bet.
IE: Player $1 bet: has 10 ways to lose $1 and 1 way to win $9. The total money wagered is $11. The sum of outcomes (10*-1 + 1*9) is -1.
-1/11 ~ -9%
The casino, on the other hand, is betting $9. 1 way to lose $9 and 10 ways to win $1. Total money wagered is $99. The sum of outcomes (-9*1 + 1*10) is +1.
+1/99 ~ +1%.
Quote: RS"House Edge" is actually a bit of a misnomer.
The casino isn't betting $1 against your $1. The casino is betting $9 against your $1. You just have a 9% disadvantage.
The casino has a 1% or so advantage on their $9 bet. You have a 9% (or so) disadvantage on your $1 bet.
This. +1. Whatever the term for "exactly" is this week.
The amount of the house edge is the same on both sides of the place bet because you are putting up 9x what the casino is.
The percentage, on the other hand, is different because each side is betting a different amount.
Quote:in any case that has to be the most unheard of bet in a casino - to take the large end of the bet. I can't think of anything like that for the moment
I take it back, the most unheard of thing is to intentionally allow a bet with a player edge
When it comes table games I think Craps has the largest lay bet available at 19 to 41 when laying the 4 or 10 (when factoring in the vig). I can't think of anything with a smaller payout compared to the original bet.
You can lay much higher odds on sports. The infamous No Safety SB bet comes to mind.
This is just a thought experiment for me, not a serious idea that I'm going to try to sell to casinos or anything. They wouldn't want this bet. Obviously if a casino did implement this it would not be at 1 to 9. It would be at 1 to 10 or 1 to 11. Much like how 99% of sports betters don't lay -900 on No Safety in the SB, 99% of players would never lay 1 to 9 on a bet at a Craps table even if they had an advantage so no players would ever lay 1 to 10 or 1 to 11 on a bet where the casino had an advantage so it would just never be implemented.
I'm just messing around trying to intersect my interest in (basic) programming with my interest in gambling.