Skip to main content

Poker test, 10,000 four-digit values (2070)

Short answer

From four‑digit probabilities (all different 0.504, one pair 0.432, two pairs 0.027, three of a kind 0.036, four of a kind 0.001), χ0² ≈ 51,516. With df=4 and critical value 9.488 at α=0.05, randomness is strongly rejected.

A set of 10,000 4-digit random values have been generated. An observation shows that 5065 values have all different digits, 2000 have 2 of a kind digits, 760 have 3 of a kind, 1500 have 2 pairs and 675 have all same digits. Test these values for randomness using Poker test (Use α = 0.05).

Setup. H0: the numbers are random (independent). H1: they are not. N = 10,000. The counts given are: all different 5065, 2 of a kind (one pair) 2000, 3 of a kind 760, two pairs 1500, all same 675. They add up to 10,000. Five classes, df = 4, α = 0.05, so χ²0.05,4 = 9.488.

Probabilities: all different 0.504, one pair 0.432, two pairs 0.027, three of a kind 0.036, four of a kind 0.001. Ei = 10,000 × probability.

PatternProbabilityOiEi(Oi − Ei)²/Ei
All different0.504506550400.124
One pair (2 of a kind)0.432200043201245.926
Two pairs0.02715002705603.333
Three of a kind0.036760360444.444
All same (4 of a kind)0.0016751044222.500

χ0² = 51,516

Conclusion. Since χ0² ≈ 51,516 is far greater than 9.488, H0 is rejected. The values are not random. For example, 675 numbers with all four digits the same against only 10 expected, and 1500 two-pair numbers against 270 expected, show a strong departure from a random sequence.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Simulation and Modeling chapter 6 questions →