Amusing Cribbage Facts
Have you ever wondered about the distribution of Cribbage scores for a
hand pulled at random (with four cards in the hand and one card up)?
Neither have I. But hey, this is the Web, and you never know when
someone might want to know something like this.
Picking 5 cards from a 52-card deck gives roughly 2.5 million possible
hands. Since exactly one card will be the up-turn, we need look at a
mere 12,994,800 hands. My Sparc scoffs at such tiny numbers.
Rules Used for Scoring
- 15's
- Each combination of cards summing to 15 (where face cards are worth 10)
counts 2 points.
- Pairs (3-of-a-kind, etc.)
- Each pair counts 2 points (hence 3-of-a-kind counts 6 points).
- Runs
- Each run of 3 or more cards (e.g., 5-6-7) counts the length of the run
in points. Duplicate cards in the run count once for each combination, so
A-A-2-3-3 counts 12 points as a quadruple run of 3 (not counting scoring from
pairs). Aces are low.
- Flushes
- 4-card flushes (in the hand only) count as 4 points; 5-card flushes
count as 5 points.
- His Nobs
- A Jack in the hand of the same suit as the upcard counts 1 point.
The Distribution
The various columns represent the score of the hand, the number of hands
with that score (out of 12,994,800), and the percentage of such hands.
0 | 1009008 | 7.7647 |
|
10 | 388740 | 2.9915 |
|
20 | 8068 | 0.0621 |
1 | 99792 | 0.7679 |
|
11 | 51680 | 0.3977 |
|
21 | 2496 | 0.0192 |
2 | 2813796 | 21.6532 |
|
12 | 317340 | 2.4421 |
|
22 | 444 | 0.0034 |
3 | 505008 | 3.8862 |
|
13 | 19656 | 0.1513 |
|
23 | 356 | 0.0027 |
4 | 2855676 | 21.9755 |
|
14 | 90100 | 0.6934 |
|
24 | 3680 | 0.0283 |
5 | 697508 | 5.3676 |
|
15 | 9168 | 0.0706 |
|
25 | 0 | ------ |
6 | 1800268 | 13.8538 |
|
16 | 58248 | 0.4482 |
|
26 | 0 | ------ |
7 | 751324 | 5.7817 |
|
17 | 11196 | 0.0862 |
|
27 | 0 | ------ |
8 | 1137236 | 8.7515 |
|
18 | 2708 | 0.0208 |
|
28 | 76 | 0.0006 |
9 | 361224 | 2.7798 |
|
19 | 0 | ------ |
|
29 | 4 | 0.00003 |
The Code
Do you really think I'd make such difficult code available for public
consumption? Am I prepared to have people point out bugs and poor coding
tendencies? Do I want to hear about how many more comments I need to
achieve an optimal comment-to-code ratio? Do you enjoy reading lots of
silly questions?
Click on this if you prefer code.
Acknowledgements
My officemate, Seth Copen Goldstein, wanted to receive credit as a co-author
for this work (don't ask me why!), so...there it is. And despite his
better judgment, Mike Mitzenmacher filled me in on the details of Cribbage
rules (which I had partially forgotten).