# How to find out if an online poker-site is fair?

Last week I had an interesting discussion with a good friend of mine. He had been playing some online poker and suggested that there is a relationship between new subscription/additional money transfer and the cards that you're dealt, i.e. you get good cards to get hooked. The sites would probably be risking a lot if this was true but the problem still fascinates me.

My first approach to this was to ask my friend to define "good cards" and do a simple binomial test. My friend had though a hard time defining what exactly good cards are. If he gets really bad cards he knows to fold while if he gets good cards he knows to go all in - the bad cards are the ones in between.

My other approach would be to calculate the exact probability of each given hand and then to see if it differs from the expected, perhaps using a Wilcoxon signed-rank test since this should detect a different distribution shape as well as a true shift. I guess the hard part is to calculate the exact probability.

The data would consist of the first 0-100 dealt cards compared with 300-400 dealt cards a week later (or a friend that's been on the site for a while).

Question: How would you suggest to approach the issue?

How Texas hold'em works

I'm no expert gamer (I've only played Texas hold'em 3-4 times) but it's fairly simple, you can find more details on the Wikipedia page here.

The main difference from regular poker is that you only get 2 cards at start. You don't get to switch these cards. On the table are another 5 cards face down. By combining your two with the tables 5 you choose the best possible 5 card-poker hand.

For instance if you get 2 aces you have a good start and you will probably go in strong, likewise if you have a 7 and a 2 your chances to win are very slim and you quickly fold. The hard part is perhaps a queen and a 9 where you might end up without anything although your cards are above the "average". You can find a list of the poker hands here.

-
I hope you did tell your friend that this is most likely a figment of his imagination. And if he is playing in any of the bigger sites, I'm 99% sure they are not cheating. – luispedro May 27 '12 at 13:20
Interesting question. In legal/big sites they do not need to cheat, the probability of losing in any of the games they offer is greater than $0.5$. This is a well-known fact (see e.g. Gambler's ruin and Martingales) and legal because they are 'Entertainment Industries'. So, they do not really need to cheat, they just wait for the pidgeons :P – user10525 May 27 '12 at 14:40
@Procrastinator, when you're playing poker against other players (not the house), you could certainly have the odds in your favor if your skill greatly exceeds their's. The odds could even be so far in your favor so that they negate any 'rake' the site takes from the pot. How do you think professional poker players consistently make money? – Macro May 27 '12 at 15:49
@luispedro You're probably right about this being a non-issue but I would like to show this to him using basic statistics how to prove this. – Max Gordon May 27 '12 at 18:16
This is a very complicated question - fair in what sense, exactly? You could have the correct marginal distribution of hands/wins but still be "unfair". For example, you could have AA beat a random hand one-on-one $82\%$ of the time (this is the theoretical probability, approximately) but have those wins and losses be unfairly distributed (e.g. maybe the player with the larger chip count wins/loses more often than they should). These kind of nuances make this question difficult to answer is a unified way - you'd need to consider the joint distribution of cards AND the chips counts, etc... – Macro May 27 '12 at 18:19
show 4 more comments

## 3 Answers

You can use Sklansky's starting hand ranking to know the strength of a dealt hand from 1 to 8. Generate a random sample with the first 100 hands, another with the next 100 hands and compare them with the Wilcoxon test.

-
This could be an interesting approach - both easy to understand and deploy. Although I'm slightly curious to if there is a more perfect solution – Max Gordon May 27 '12 at 18:29
(+1) I am sure there is. This one is the first thing that came to my mind (and the approach I would actually use). Checking that the hands are uniformly drawn from the set of possible hands sounds more perfect, but probably with much less power. – gui11aume May 27 '12 at 18:31

Procrastinator and Macro are clearly correct in saying that the house does not need to cheat to win on average and that a sufficiently skilled player will win enough money against amateurs to overcome the house's "rake". However, a greedy and dishonest house has lots of ways to cheat if it wants to. The house could create fake highly skilled electronic players who win often but are, in actuality, owned by the owner of the site. Those players could be given a further advantage by sometimes telling them the contents of the other players hands. And those are schemes that only took a few minutes to think up.

Question: Is there any sort of regulatory commission that audits the algorithms?

Even in the case of a perfectly honest game, unless your expectation is sufficiently positive and your bank account sufficiently large, a random walk will eventually wipe you out.

-
 I doubt fake electronic players exist but I think the idea that you might want to make your site more attractive by "adding some beginners luck" is harder to reject. – Max Gordon May 29 '12 at 19:42 In fact there was a big superuser scandal on Absolute Poker/Ultimate Bet. Someone played a tournament making ridiculous plays which only made sense if he knew what everyone had, including players who had no chance to act yet and who couldn't even give information away by timing tells. By an accident, the full hand history showing all hands was released to someone who complained that the tournament felt fishy, and I wrote up a statistical analysis of it in one of my GammonVillage columns. – Douglas Zare Jul 19 '12 at 9:27

Here's a possible but expensive way to test your friend's suspicion. Let a group of people each start playing on the site in question. Record each person's net win/loss during two successive and predetermined periods of time. I would naively expect them to do as well or better during the second period because practice may improve there skill level. If the site is "suckering people in" the performance in the second period is apt to be worse and you might be able to detect it with a simple paired t-test or possibly an unpaired test.

But if the site is only a little bit greedy you may not have enough power to detect it.

-