Shuffler Part 3

2021-09-21

If you have not read part 1 and part 2 of this series on the shuffler, please go back and read them before proceeding. In part 1, streaks of events were discussed using the example of flipping a coin. We wanted to understand how often a coin flip would come up the same if we flipped a coin 100 times. Further, we demonstrated how much more likely it is to observe “odd” behavior if hundreds of people flip a coin 100 times. In part 2, we developed an expectation for how often a blitz - and related important events - should occur with a random shuffle. We then compared the expectation against what we are seeing in over 400,000 hands dealt on the site.

In this article, we will tie in the analysis of streaks developed in part 1. It is frustrating sitting at a table while a series of blitzer hands are dealt to other players. We will use our simulation code in part 1 of this series to discover how often we should expect a run of blitzers at a table. We will check how this compares to what we are seeing in practice on the site.

Streaks of blitzers

We have to adjust the simulation code from part 1 so that we are only looking at streaks of “successes”. In part 1, we were interested in any kind of streak (heads or tails), and since each occurred with equal probability, there was an equal chance of seeing a streak of heads as tails. We can think of dealing someone blitzers the same as flipping a coin where the probability of heads is 27.95%. We derived that probability of a blitzer in part 2.

We will run the simulation with the probability of heads as 27.95% and look for the streaks of heads. One thing that hasn’t been mentioned before is the idea of independence across observations. This means that the probability of the current shuffle dealing a blitzer has nothing to do with whether the previous shuffler dealt a blitzer. It is tempting to think that because the previous hand had a blitzer, this hand should not have a blitzer. The shuffler follows the same process whether the previous hand was a blitzer or not, so just as we are equally likely to flip a heads even after flipping 5 consecutive heads, we are just as likely to observe a blitzer right after another blitzer.

For contrast, an example of dependent observations are daily high temperatures. If the temperature today was 80 degrees, this information helps us understand how likely it is to be 80 degrees tomorrow. There are still a large range of possible temperatures tomorrow - especially in Wisconsin - but it is more likely tomorrow’s temperature will be 80 degrees than if today’s temperature was 40 degrees. In this way, there is dependence in daily high temperatures.

It’s this idea of independence that allows us to use the simulation approach we studied in part 1 and observe streaks in the simulation. The table below shows the result of counting the maximum blitzer streak out of 50 hands over 1,000,000. Fifty hands was chosen beause it is a normal amount of hands for an avid player on the site in a day. It takes about an hour to play 50 hands.

Streak Occurrence Count % Of Total
1 38,396 3.8%
2 408,951 40.9%
3 361,019 36.1%
4 135,695 13.6%
5 40,619 4.1%
6 11,140 1.1%
7 3,033 0.3%
8 852 0.1%
9 214 0.0%
10 60 0.0%
11 15 0.0%
12 5 0.0%
14 1 0.0%

The table suggests there will be about one day per month where there are no two consecutive hands with a blitzer. It’s actually more likely to have a day where five or more hands have a blitzer than it is to never have a streak (2 or more). The most common maximum streak is 2, with a streak of 3 almost as likely. One of the million simulated days had 14 blitzers in a row.

If you aren’t comfortable in Python but can use Microsoft Excel, you can experiment with this yourself by entering the formula below into a cell.

=IF(RAND()<0.2795,”Blitz”,”No”)

Then copy the formula down and inspect the column for streaks of blitzers.

Comparison with actual streaks of blitzers on the site

In part 2 of this series on the shuffler, it was established that there is no difference between looking at a string of hands on the same table as there is looking at a string of hands across the whole site. This is aided by inside knowledge of the shuffler. The code that shuffles the cards doesn’t take any input. The shuffler doesn’t care if the last hand was a blitzer, and it doesn’t care whether you’re at table 2 or table 6. It just takes a deck of cards, shuffles them, and passes them out.

Because we can look at streaks of blitzers across the whole site, we will simply group each consecutive 50 hands dealt on the site, determine the maximum streak of blitzers on each set of 50, and determine the percentage associated with each streak length. We can compare this streak length distribution to the expectation we showed above. The site distribution presented below is based on about 9,200 sets of 50 hands dealt on the site.

Streak Length Expectation Site Distribution
1 3.8% 4.6%
2 40.9% 41.1%
3 36.1% 35.2%
4 13.6% 13.5%
5 4.1% 4.3%
6 1.1% 0.9%
7 0.3% 0.2%
8 0.1% 0.1%
9 0.0% 0.0%
10 0.0% NA
11 0.0% NA
12 0.0% NA
14 0.0% NA

Note that the NA shown for the site distribution in the table means that streak length never appeared in the data. Since the simulation we ran to create the expectation had 1 million sets of 50 and the site data has only 9,200 sets of 50, it’s not surprising that the simulation had some longer streaks that haven’t appeared yet on the site. Overall, the site streak distribution seems to track closes with the expectation.

Conclusion

If you play about 50 hands per day and observe 5 blitzers in a row, know that this is something you can expect to see happen about once every two and a half weeks. This includes the probability of seeing more than 5 blitzers in a row. Understanding the frequency of these types of events is a great tool for reducing frustration.