Knuth's poker test poker measures how often poker hands occur when dealt with the datagen random number generator.
5 cards (1,2,3,4,5) are dealt with replacement. The probability for each card is 1/5.
Each hand contains the following possible matches:
Match | Example | Count | Probability |
---|---|---|---|
All different | 1,2,3,4,5 | 120 | 0.0384 |
One pair | 1,1,2,3,4 | 1200 | 0.384 |
Two pairs | 1,1,2,2,3 | 900 | 0.288 |
Three of a kind | 1,1,1,2,3 | 600 | 0.192 |
Full house | 1,1,1,2,2 | 200 | 0.064 |
Four of a kind | 1,1,1,1,2 | 100 | 0.032 |
Five of a kind | 1,1,1,1,1 | 5 | 0.0016 |
Total | 3125 | 1.0000 |
The result of the test is measured by the chi-square test.
The syntax for poker is:
poker size
poker 10000
In this example, the program deals 10000 hands.
The result should fall within the range given by the program 95 percent of the time.
If you are interested in 52 card poker without replacement, see the test pkrhnd.
If you are interested in dice poker with replacement, see the test dicepkr.
Table of Contents
Job and Record Level Definitions
Field Level Definitions
Datagen Syntax
Supporting Routines
FAQ
Copying