Friday, January 1, 2010

House edge of casino

Anybody who is familiar with casino will also be familiar with the term house edge. House edge basically means how much a casino earns on average from each bet. Of course that means that the number of hands played has to be substantially large so that the individual wins and losses of players get evened out. When I was asked to compute the house edge for Baccarat, I was stumped. On googling the term, I realized that there are different ways to compute house edges for different games. For Baccarat, we had to determine the frequency of wins if bets are placed on Banker, Player and Tie. This was easy. After getting data from DB, I got the frequency of wins. Then for Banker bets, I computed the actual expected earning of a player by multiplying the win factor (0.95) with the % of wins on Banker bets. Then finally, going by the logic, that the win % of Banker bets is actually inverse of how much the player should be losing, we get the amount of how much the casino is actually losing. Ideally, for a game with house edge of 0, these 2 figures should match. The difference is the house edge of the casino for Baccarat game for the bets placed on Banker. This was straightforward. The tougher part was the way Ties were figured out. I had to compute the odds of such events and then compare them with the frequency of Ties events occurring. The difference was the house edge. Well, was I proud? Not really, because the house edge came to be substantially larger than expected. The world wide figure is around 1.5% for bets placed on Banker, but for us, it came to be 15%.
Next day, I received the request for computing house edges for rest of games. For Roulette, it was trivial. As we play American Roulette, there are 38 pockets, but we pay only 36 times the bet amount for a win on point. That gives us the house edge of 2/38. This was corroborated by the data from the DB. The harder ones were Videopoker, Keno and Blackjack. The first 2 are enormous because there are so many permutations and combination that it defied logic. The last one involves skill too and so it leads to very difficult calculations. I googled it and I found that actually very complex mathematical models have to be constructed and that some people have made it their career :-). There is a guy who goes by the name Wizard of the Odds. There are some really impressive information over there. Do check them out :-)
Anyways, so I was in a conundrum. I had to give some values for house edges and I didn't know how to start. Well then I had this brainwave. Instead of computing the theoretical values of house edges for these game, I could compute the house edges due to our server implementation. Well, then I got the data from DB and for each game computed the sum of all the bet amount and win amount ever played on our live server. For Blackjack, there were more than 10000 hands. For Keno it was only 250, which is understandable. So, the formula goes like this ---
House Edge = (Total bet - Total win)/Total bet.
This formula will give the actual house edges as experienced by players. Voila, the problem solved, I shared the house edges with boss. For Roulette, our house edge is actually 3% (theory says it should be 5%). For Blackjack, it is 5%. For Videopoker, it is again 5%. For Keno, it came to be 27% which is understandable as hands played were less.
Meetu's birthday fell on 28th Dec. I was in office but her father had come to visit us and they did arrange for a small celebration. On 31st, I was finally able to complete the first draft of project plan. The same night was spent in a long drunken revelry. I came home at 4 AM but Meetu was not mad at me. Thank goodness for that :-) So here is wishing everyone a very happy new year 2010.

No comments: