Five-card pattern frequencies
Deal many random five-card combinations and compare how often each pattern occurs with the exact probabilities from counting.
Simulation settings
The same seed and settings always reproduce exactly the same results.
Method
- A seeded random number generator drives a partial Fisher–Yates shuffle that draws five distinct cards from 52 (no duplicates are possible).
- Each combination is classified into exactly one of nine patterns (see the explorer).
- The observed proportion is count ÷ samples. The exact proportion is (number of combinations in the pattern) ÷ 2,598,960.
- A 95% Wilson score interval is drawn around each observed proportion. If the simulation and theory agree, about 95% of intervals should contain the exact value.
What to notice
- At 100 samples the rarest patterns usually do not appear at all. An observed probability of 0% does not mean impossible; it means too few samples.
- For common patterns the error shrinks roughly like 1/√n: ten times the samples gives about three times the precision.
- With nine patterns and 95% intervals, it is normal for one interval to miss the truth once in a while. That is what “95%” means.
Background: combinations and sampling error and the law of large numbers.