Monday, April 4, 2022

Calculating the Odds of Winning a Cribbage Game – Part 1

A Guest post by Donald E. Heller

As an almost life-long and daily cribbage player, one of the things I enjoy about the game is the ebb and flow of a typical match. At any point in time, player 1 can have a strong lead, looking like a lock to win the game, and then player 2 can get two or three great hands and pass her opponent to go on and win the game.

As this occurs, I often think about what the odds were of player 1 winning the game given the score and position on the board. For example, if I am ahead of the other player 90 to 75, what are the odds that I will win the game? This calculation is similar to what sports websites often do for games in progress. One example from ESPN is shown in figure 1 below.

Figure 1: ESPN win probability chart for Major League Baseball (screenshot courtesy ESPN)

In this game, in the top of the 4th inning and none out, and Cleveland ahead 2-0, ESPN calculates that Cleveland has a 67.3% chance of winning the game. This is based on the score and point in the game, along with ESPN’s calculations of the skills and track records of each of the two teams and their respective players.

Is it possible to calculate similar odds of winning in cribbage? My curiosity led me to a web search, but I could not find anything along the lines of what I was looking for. Being a user of Cribbage Pro, I reached out to the team there to see if they knew of anyone who had ever done these calculations. They did not, but said that they were willing to share some data with me if I was interested in doing the calculations myself. Being an experienced quantitative researcher, I agreed to take on the challenge.

Fuller Systems (the developer of Cribbage Pro) generously provided me with the data necessary to do the calculations from their log files of Cribbage Pro users. After providing me with a small sample file of anonymous data (data that couldn’t be tied back to any Cribbage Pro user), I worked on extracting the data and analyzing it. I was able to do the odds calculations I had hoped for, so Fuller Systems then provided me with a set of larger files – 72 files, each representing a consecutive hour’s worth of log records from Cribbage Pro games over the course of three days, and containing the step-by-step records of games played on the app. These are massive files, each one of the 72 with over one million records in it. In order to make the data analyzable in Stata, the statistical software that I use, I had to extract samples from each game and then combine these samples from the 72 files into a single, smaller file that could be analyzed to do the odds calculations.

This smaller file represented over 600,000 games that were completed during the 72-hour period for which Fuller Systems provided me with the data. From the scores at each point in time, and knowing who won each game, I was able to calculate the odds of each player winning the game given the score.

There are certainly some limitations to these calculations. I did not know anything about the players, so I could not conduct a sophisticated point-in-time prediction for each game that takes into account the skill and track record of each player, similar to what ESPN does in its predictions. So these predictions are what I would describe as “player-neutral,” i.e., they only relate what we know about a score at a given point with who won the game in the end, but nothing about the skill of the players.

Another limitation is that I did not calculate the odds for every potential score. To keep the analysis simple, I analyzed scores that were reasonably close and would typically be found in games. In other words, I did not calculate the odds of winning when the score was 115 for player 1 to 60 for player 2 (though one could intuit that player 1 would have very high odds of winning the game and skunking player 2).

With these caveats, table 1 shows some examples of what I found. The full table can be found here (note: in the table the “Win %” is the percentage of games won by player 2; the win percentages were calculated only for those scores that had at least 100 occurrences in the data).

Table 1 – Odds of winning for a variety of scores

Player 1 score

Player 2 score

Odds of player 2 winning

30

40

61%

60

70

78%

60

80

84%

90

91

54%

90

95

61%

90

100

76%

100

110

78%

In general, the wider the margin between the two players, the greater are the odds that the player who is ahead will win. But this pattern, however, is not perfect. Figure 2 below provides one example. As noted, the closer player 2 is to winning when player 1 has a score of 100, the greater the odds are that player 2 will win the game. But you will note the interesting dip starting when player 2 has a score of 117.

Figure 2: Calculated odds that player 2 wins the game when player 1 has 100 points

The reason for this can be found in the laws of probability. For example, if you flip a true coin, you know the odds are 50 percent that it will come up tails, and 50 percent that it will come up heads. If you flip it ten times, you would expect five heads and five tails. But if you conducted this experiment of ten coin flips a number of times, you would probably find that it was not always split 50 percent between heads and tails. And if you conducted 100 coin flips, the same would be true – you would likely not have exactly 50 heads and 50 tales.

The same is true in the game of cribbage. While you would expect that a wider lead would lead to an increased chance of winning the game, this is not necessarily always true, even over the hundreds of games represented by each of the scores in the table. Another reason for this is that the scores used in my analysis are taken at random points in time, e.g., at the end of the hand, or during the counting of a hand, etc. So who wins the game could be impacted by who has the deal and who is counting when the score in the analysis was used.

Part 2 of this post will explore this phenomenon further. For now, I hope that you enjoy using the table to look up your odds of winning the game as you play cribbage. But remember – these predictions are not perfect, and as they say, your mileage may vary!

Donald E. Heller is a retired professor and college administrator, and lives in San Francisco. He was taught the game of cribbage as a child, and plays daily with his wife as well as on Cribbage Pro.