Bitcoin Forum
November 08, 2024, 05:10:56 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: The houses Kelly Criteria?  (Read 621 times)
PimpingSincePimping (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
August 03, 2016, 05:30:08 PM
 #1

So I have been wondering,

In the case of being the house with a bankroll, how do you calculate what the maximum profit a user can make in a single bet via the Kelly Criteria?

Also do all casino/dice sites use this?

Please only comment if you know for sure.

Thanks

RHavar
Legendary
*
Offline Offline

Activity: 1463
Merit: 1886



View Profile
August 03, 2016, 05:56:40 PM
 #2

In the case of a two-outcome bet, it's trivial.

From the houses perspective: Get the expected value of the bet, divide by the most amount of money you can make from that bet (the lose outcome from the player perspective). Then multiply that by your bankroll, and that is the most amount of money you should risk.


It's *significantly* more complex for multi-outcome bets (e.g. slot machines, plinko etc.)


As for if most casinos do it, that's a strong no. Most bitcoin casino owners are lacking in the maths department, I'm aware of 5+ casinos misunderstanding the kelly and using it wrongly. I can only think of just-dice.com which actually does everything properly, but it's not even a bitcoin casino Sad

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
PimpingSincePimping (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
August 03, 2016, 06:15:29 PM
 #3

In the case of a two-outcome bet, it's trivial.

From the houses perspective: Get the expected value of the bet, divide by the most amount of money you can make from that bet (the lose outcome from the player perspective). Then multiply that by your bankroll, and that is the most amount of money you should risk.


It's *significantly* more complex for multi-outcome bets (e.g. slot machines, plinko etc.)


As for if most casinos do it, that's a strong no. Most bitcoin casino owners are lacking in the maths department, I'm aware of 5+ casinos misunderstanding the kelly and using it wrongly. I can only think of just-dice.com which actually does everything properly, but it's not even a bitcoin casino Sad

Hey thanks for your quick answer Smiley

Can you explain this a bit more sorry but it didn't quite sink in? (newbie)

Get the expected value of the bet

Right now from what you've said my understanding is:

(Huh / playerBet) * houseBR

Is the "expected value" suppose to be what the player would stand to profit?

As for if most casinos do it, that's a strong no. Most bitcoin casino owners are lacking in the maths department, I'm aware of 5+ casinos misunderstanding the kelly and using it wrongly. I can only think of just-dice.com which actually does everything properly, but it's not even a bitcoin casino Sad

That's unfortunate that they don't try and understand the math before opening a gambling site, lol. Just-Dice is the golden egg when it comes to doing things right. Well done to them.
DarkStar_
Legendary
*
Offline Offline

Activity: 2772
Merit: 3284


View Profile WWW
August 03, 2016, 06:26:29 PM
Last edit: August 04, 2016, 12:57:51 AM by DarkStar_
 #4

Can you explain this a bit more sorry but it didn't quite sink in? (newbie)

Get the expected value of the bet

Right now from what you've said my understanding is:

(Huh / playerBet) * houseBR

Is the "expected value" suppose to be what the player would stand to profit?
The expected value is the profit the house can expect to for each bet. A 1 BTC bet on dice with a 1% house edge has a expected value of 0.99BTC to the player, so the expected value to the house is 1.01BTC(?). I might be wrong about the EV for the house in that situation, since I haven't seen it shown anywhere. (granted, no sites really have a reason to show it)

Edit: Win chances have no affect on the EV. A house edge of 1% means an EV of 1% (of the players bet, for the casino)

taking a break - expect delayed responses
PimpingSincePimping (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
August 03, 2016, 06:47:01 PM
 #5

Can you explain this a bit more sorry but it didn't quite sink in? (newbie)

Get the expected value of the bet

Right now from what you've said my understanding is:

(Huh / playerBet) * houseBR

Is the "expected value" suppose to be what the player would stand to profit?
The expected value is the profit the house can expect to for each bet. A 1 BTC bet on dice with a 1% house edge has a expected value of 0.99BTC to the player, so the expected value to the house is 1.01BTC(?). I might be wrong about the EV for the house in that situation, since I haven't seen it shown anywhere. (granted, no sites really have a reason to show it)

Shouldn't the probability of the houses win/loss be accounted for? It seems to be ignored here - for example when a user bets 2x on a 1% edge its 49.50% they win, therefore 49.50% the house loses.

From what I've understood so far based on whats been said, if there's a bank roll of 100 BTC, and a person bets 5 BTC with a house edge of 1%
Code:
EV = 5 * (0.01) = 0.05
risk = (0.05/5) * 100 = 1

therefore we would consider this an invalid bet because risk < persons bet.

but suppose they bet 1 BTC instead,
Code:
EV = 1 * (0.01) = 0.01
risk = (0.01/1) * 100 = 1

this is valid since risk >= persons bet?

but to me it seems like this could be generalized to risk = edge * BR since EV/playerBet = edge
RHavar
Legendary
*
Offline Offline

Activity: 1463
Merit: 1886



View Profile
August 03, 2016, 08:05:09 PM
 #6

Can you explain this a bit more sorry but it didn't quite sink in? (newbie)

Get the expected value of the bet

Right now from what you've said my understanding is:

(Huh / playerBet) * houseBR

Is the "expected value" suppose to be what the player would stand to profit?
The expected value is the profit the house can expect to for each bet. A 1 BTC bet on dice with a 1% house edge has a expected value of 0.99BTC to the player, so the expected value to the house is 1.01BTC(?). I might be wrong about the EV for the house in that situation, since I haven't seen it shown anywhere. (granted, no sites really have a reason to show it)

Your explanation is right, but numbers are wrong. The EV is indeed the expected profit, but a player wouldn't have an expected profit of 0.99 BTC, but rather an expected profit of -0.01. And from the houses perspective, they have an expected profit of 0.01 btc for each one of these bets.

 The EV is simply calculated:

Code:
SUM OF (   probability * profit)  for each possible outcome

So taking a 1 BTC bet on a 1% house edge game doing 2x, from the players perspective:


49.5% (chance of winning)  * 1 (profit if win) + 50.5 (chance of losing) * -1  (profit if lose) =

0.495 - 50.5 = -0.01

In other words, the players have an expected value of -0.01  (over an infinite amount of bets, players will lose an average of 0.01 BTC per bet). Doing it from the houses perspective on the other hand will yield and EV of 0.01  (over an infinite amount of bets, their average win will be 0.01 per bet).


Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
RHavar
Legendary
*
Offline Offline

Activity: 1463
Merit: 1886



View Profile
August 03, 2016, 08:08:34 PM
 #7

but to me it seems like this could be generalized to risk = edge * BR since EV/playerBet = edge

That's not a perfect generalization, but holds assuming:
 1) When a bet has two outcomes (win, lose)
 2) The lose outcome results in you losing your entire wager  (e.g. Dice)


My version is slightly more general, because it doesn't assume on 2)

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
RHavar
Legendary
*
Offline Offline

Activity: 1463
Merit: 1886



View Profile
August 03, 2016, 08:12:05 PM
 #8

Is the "expected value" suppose to be what the player would stand to profit?


It's the "average" profit over an infinite amount of bets. Full details: https://en.wikipedia.org/wiki/Expected_value

Assuming you're running a sane casino, the EV from players perspective should be <0, and the house EV is always * -1 the players EV.

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
PimpingSincePimping (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
August 03, 2016, 08:23:19 PM
 #9

Thank you very much once again for taking your time to explain this to me, so lastly, for clarification (I've probably over complicated things here but):

Code:
// note: 
// mult - is the odds the user is playing with, i.e. 2x is 1:1
// bet - is the users bet
// bankroll - self explanatory
// edge - house edge, 1.01 in this case for 1%

            var q = 1.00 / (mult * edge); // chance of house losing
            var p = 1.00 - q; // chance of house winning
            var house_bet = bet * (mult - 1);

            var ev = (p * bet) + (q * -house_bet);
            return (ev / bet) * bankroll;

What is done then with the returned value (ev / bet) * bankroll to ensure that the bet is valid and meets the kelly criteria? Is it that the server then needs to ensure (ev / bet) * bankroll > house_bet
RHavar
Legendary
*
Offline Offline

Activity: 1463
Merit: 1886



View Profile
August 03, 2016, 09:05:54 PM
 #10

Thank you very much once again for taking your time to explain this to me, so lastly, for clarification (I've probably over complicated things here but):

Yeah you are, considerably. I didn't checking your code, but "edge" is already defined as  "ev / wager" so you can just multiple that by the house bankroll to figure out the most you should be risking each bet. (assuming when a player loses, he loses his entire wager).

e.g. If you're running a game that has a 1% house edge, the kelly would say your optimal bankroll growth is achieved by risking up to 1% of your bankroll.


(Where many casinos screw up, is they don't take remove commissions from the EV. So say they charge investors 50% of the house edge each bet, risking 1% of the bankroll with a 1% house edge bet actually is more like ~2x the kelly)

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
DarkStar_
Legendary
*
Offline Offline

Activity: 2772
Merit: 3284


View Profile WWW
August 04, 2016, 01:03:27 AM
 #11

Your explanation is right, but numbers are wrong. The EV is indeed the expected profit, but a player wouldn't have an expected profit of 0.99 BTC, but rather an expected profit of -0.01. And from the houses perspective, they have an expected profit of 0.01 btc for each one of these bets.
So EV = expected profit? I mostly understand your post, except for that part, since I always thought that EV = Expected Value. I think that the player's expect value of 0.99BTC is correct though, but you used expected profit which confused me. The reason I said the EV was 0.99BTC was because of what I see on moneypot:


taking a break - expect delayed responses
RHavar
Legendary
*
Offline Offline

Activity: 1463
Merit: 1886



View Profile
August 04, 2016, 01:08:22 AM
 #12

Expected Value is indeed the same as Expected Profit.



Actually, I'm the one who originally wrote that table for MoneyPot showing the "Expected Value" so I'm to blame for the misunderstanding. The page is correct, just confusing. It's showing the expected value of that *one* payout being 9.9 bits. But there's a second payout (the lose payout, with prob of 50.5) which has an EV of -10 bits.

So that's why at the bottom of your screenshot it shows: "Total Expected value: -0.1 bits"


 Grin

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
ndnh
Legendary
*
Offline Offline

Activity: 1302
Merit: 1005


New Decentralized Nuclear Hobbit


View Profile
August 04, 2016, 02:20:33 PM
 #13

Your explanation is right, but numbers are wrong. The EV is indeed the expected profit, but a player wouldn't have an expected profit of 0.99 BTC, but rather an expected profit of -0.01. And from the houses perspective, they have an expected profit of 0.01 btc for each one of these bets.
So EV = expected profit? I mostly understand your post, except for that part, since I always thought that EV = Expected Value. I think that the player's expect value of 0.99BTC is correct though, but you used expected profit which confused me. The reason I said the EV was 0.99BTC was because of what I see on moneypot:



I understand why there is that confusion. (I am sure you understand the logic. Just the terms are confusing.)

You are betting 1BTC, and your expected return for the bet after making the bet is 0.99BTC. The expected value of making the bet is -0.01BTC.
The bet is worth -0.01BTC to you and 0.01BTC to the house.

So for every 1BTC bet you make, the player loses 0.01 and the house wins 0.01. Theoretically.

While calculating the Expected value of the bet, we cannot ignore the risked amount.
ndnh
Legendary
*
Offline Offline

Activity: 1302
Merit: 1005


New Decentralized Nuclear Hobbit


View Profile
August 04, 2016, 02:41:49 PM
 #14

From the houses perspective: Get the expected value of the bet, divide by the most amount of money you can make from that bet (the lose outcome from the player perspective). Then multiply that by your bankroll, and that is the most amount of money you should risk.

(Huh / playerBet) * houseBR

Okay, so it comes to

EV / Max bet * Your bankroll = Max amount you should risk


Can someone provide an example?
RHavar
Legendary
*
Offline Offline

Activity: 1463
Merit: 1886



View Profile
August 04, 2016, 05:15:31 PM
 #15

From the houses perspective: Get the expected value of the bet, divide by the most amount of money you can make from that bet (the lose outcome from the player perspective). Then multiply that by your bankroll, and that is the most amount of money you should risk.

(Huh / playerBet) * houseBR

Okay, so it comes to

EV / Max bet * Your bankroll = Max amount you should risk


Can someone provide an example?

Max bet doesn't directly fit in. The kelly will tell you the most you should risk per bet. E.g. Imagine I run a normal (1% HE) dice site, with a 1k bitcoin bankroll. The kelly says risking 1% per roll leads to optimal bankroll growth, which is 10 BTC. So that is the same as 1 BTC @ 11x  ... or   100 @ 1.1 x.  So a casino with a fixed house edge, should put limits on the max profit, not max bet.

(Sites like bustabit have a dynamic house edge, so it's not so simple. It has a limit both on max bet (1 BTC) as well as max profit)

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
ndnh
Legendary
*
Offline Offline

Activity: 1302
Merit: 1005


New Decentralized Nuclear Hobbit


View Profile
August 05, 2016, 06:14:30 AM
 #16

From the houses perspective: Get the expected value of the bet, divide by the most amount of money you can make from that bet (the lose outcome from the player perspective). Then multiply that by your bankroll, and that is the most amount of money you should risk.

(Huh / playerBet) * houseBR

Okay, so it comes to

EV / Max bet * Your bankroll = Max amount you should risk


Can someone provide an example?

Max bet doesn't directly fit in. The kelly will tell you the most you should risk per bet. E.g. Imagine I run a normal (1% HE) dice site, with a 1k bitcoin bankroll. The kelly says risking 1% per roll leads to optimal bankroll growth, which is 10 BTC. So that is the same as 1 BTC @ 11x  ... or   100 @ 1.1 x.  So a casino with a fixed house edge, should put limits on the max profit, not max bet.

(Sites like bustabit have a dynamic house edge, so it's not so simple. It has a limit both on max bet (1 BTC) as well as max profit)


I took max win first, and with SafeDice values I got average kelly to be 2.
0.1/9.8*200 = ~2

But then I read again
Quote
the most amount of money you can make from that bet (the lose outcome from the player perspective).
and replaced max win with max bet (certainly above 10000) to get numbers that didn't make sense. Grin


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!