Slot Machine Test

Copying slots

slots is a program that allows you to play a slot machine thousands of times to see how much money you win. The chi-square test tells you if you win certain prizes at the expected rate.

The machine used in this program has 20 symbols for each of three columns. In some cases there are two symbols per column and row. For example, column two, row four has a seven and an orange.

slots has two parameters:

Example of how to run the program.

      slots 10000 0.10

In this example, the program plays 10 thousand times, inserting a dime for each trial. The program prints

The Chi-square number should fit within the Range 95 percent of the time.

In some tests, the payoff may be greater than the money you insert in the machine. If this happens, re-run the test. The payoff on the slot machine is 94.45 percent, on the average.


Slot Machine Symbols

Abbreviation Meaning
Che Cherry
Ora Orange
Plm Plum
Bel Bell
Mel Melon
Bar Bar
Sev Seven
Lem Lemon

Occasionally, symbols, like melon and orange, are paired together.


References

The chi-square test is similar to:

Chapter 12, Chi-square Tests
Section 3, Testing for Goodness of Fit
Formula 12-3
Example 12-4

In Table 12-3, each category in the chi-square test has a different expected frequency. This corresponds to the different expected frequencies for the number of successes.


John Scarne
Scarne's New Complete Guide to Gambling
Fully revised, expanded, updated edition
New York: Simon & Schuster, 1961, 1974, 1986
A Fireside book, 871 p.
ISBN: 0-671-21734-8 hardback
ISBN: 0-671-63063-6 paperback
Chapter 15, Slot Machines: The One-armed Bandits
Section: Slot Machine Odds