# Statistics on games, how do you know if it is fair?

1. Jul 31, 2010

### KFC

Hi there,
I am thinking if statistics can tell us if a slot machine is fair or not? We know that there are so many outcomes of a slot machine and seems it is not practical to sample all possible outcomes to check if it is fair or not. So how does statistics work in this issue?

2. Jul 31, 2010

### SW VandeCarr

First, what is a "fair" slot machine? Every machine has a predetermined statistical payout which is changed from time to time. It's not the same as fair coin which is supposed have a 50% chance of heads. The percentage of a slot machine is whatever the casino judges is good for business. Too low and players might go elsewhere. Too high, and the casino's potential profits go elsewhere.

3. Jul 31, 2010

### cesiumfrog

They're designed not to be fair. The whole point is to take in far more money than they let back out. They contain devices specifically to prevent the jackpot coming up as often as one naively expect from the appearance of the outside of the machine. (There was a recent case where a casino got out of paying a big jackpot, basically because it was far more probable that the machine had malfunctioned than that a player had won.)

4. Aug 1, 2010

### KFC

I understand there is no so-called 'fairness' in gambling. What is in my mind when I thinking this is I want to know how can we tell if a device or any system of games which has multiple outcomes is fair, i.e. all outcomes have equal probability to occur. Forget about the slot machine, if I have a device with have so many states, how can I tell if that device has no any biased outcomes due to mechanical problem, for instance, statistically?

5. Aug 1, 2010

### HallsofIvy

Staff Emeritus
The "mean" or "expected value" is what you want. If the mean value of the payout for a gambling game is 0, then it is "fair".

6. Aug 1, 2010

### KFC

But if you want to find out the expectation value, you need to know the probability and the times of occurance of each states. Assume the probability distribution is uniform, so how many samples are said to be enough to tell the fairness or find out the expectation?

7. Aug 1, 2010

### SW VandeCarr

If your assumption of a uniform distribution is well founded, it should be relatively easy to detect unfairness. For n states, each state has an expected probability of 1/n of occurring. Run a long sequence of trials (each trial gets one outcome) and evaluate the deviation from the expected distribution. You can use a chi square test for this. Each state will need an expected value of at least E=5 (10 would be better). The total number of trials will then be n*E.

Last edited: Aug 1, 2010
8. Aug 3, 2010

### The Investor

You can use a statistical test to ascertain with an ever increasing degree of certainty whether or not this is the case, as the number of trials increases. As you can't practically do an infinite series of trials you can never prove this either way with absolute certainty.

I vaguely remember a rule that said that for every decimal point of precision you want, the amount of trials required is squared, not sure about that though.

To simplify the problem, let's say you want to determine if a given coin is fair. For practical purposes you determine that a probability of heads between 0.49999 and 0.50001 is fair.

If the coin was indeed 'very close to or in between' these values, you could spend the rest of your life tossing the coin and not be able to prove anything.

9. Aug 3, 2010

### SW VandeCarr

Statistical inference is not about absolute proofs. One sets a level of possible error (alpha error) that your conclusion is wrong. For the chi square test (or any test of statistical significance) typical alpha errors are p=0.05, 0.025, 0.010, 0.005 etc. These are the probabilities of falsely rejecting the null hypothesis, in this case that the game is fair. For this problem, evidence for significant bias (if it's there and the uniform distribution assumption is correct) can be obtained with a run of 10 x n trials.

You might have something close to certainty about things that will eventually happen given enough time. Most of us would like good guidance now rather waiting. We almost certainly will all die someday. Good luck with your investments.

EDIT: Btw, your coin tossing scenario is better than almost any real world coin I'm sure. It's almost certain that every coin has at least some small (insignificant) bias.

Last edited: Aug 4, 2010
10. Aug 4, 2010

### The Investor

Sure, I agree with all of that.

Some casino's set some of their slot machines up with differing expected payoffs. So on one machine you may win on average 22 cents for every quarter you put in (for a net loss of 3 cents), another machine pays 26 cents for every quarter you put in. Obviously they don't tell you which is which.

So the casino advertises that a small number of the machines actually has a positive payoff for the customer! The trick is that the number of quarters you would need to gamble away before you determine with a large enough degree of accuracy which of the machines has a positive payoff is so large, that you will never be able to gain a positive expectancy overall in this game. Each day the position of the machines is changed.

The point I was trying to make in my original reply was that even if the position of the machines wasn't changed, and you could continue experimenting and building up data, you could only ever go as far as saying that you would now be in a position to create a positive expectancy situation for yourself, but you would never be able to guarantee that you will profit with absolute certainty, in the same way that if you were able to play a gambling game with a coin that lands on heads 50.1% of the time and pays evens on each bet, you couldn't guarantee profiting, even in the long run.

Of course it's extremely likely you will profit, but that doesn't matter. I can't guarantee that a randomly selected guy in the street will never win \$100M+ in the lottery, even though I'm almost certainly going to be right if I do say that.