In this game on Let's Make a Deal, contestants can win one of three prizes or lose by "winning" the zonk. Cards are drawn from a standard deck without replacement until one of four scenarios occurs:

- 5 hearts are drawn before 4 spades, 3 diamonds, or 3 clubs are drawn.
- 4 spades are drawn before 5 hearts, 3 diamonds, or 3 clubs are drawn.
- 3 diamonds are drawn before 5 hearts, 4 spades, or 3 clubs are drawn.
- 3 clubs are drawn before 5 hearts, 4 spades, or 3 diamonds are drawn.

Scenarios 1, 2, and 3 correspond to winning prizes (in decreasing value), while scenario 4 corresponds to losing the game by earning the zonk.

What is the probability of winning a prize? What is the probability of each outcome?

Computing this probability is not easy. Let's simulate a playthrough 10,000 times and see what happens.

1

First we import the numpy Python library to help with our simulations.

2

In [1]:

import numpy as np

3

Now we create a standard deck of cards cards.

4

In [2]:

values = ['2','3','4','5','6','7','8','9','10','J','Q','K','A'] suits = ['H','S','D','C'] cards = np.array([(v,s) for s in suits for v in values])

5

The following variables will keep track of the number of outcomes in each scenario.

6

In [3]:

win_heart = 0 win_spade = 0 win_diamond = 0 lose = 0

7

We are now ready for the main loop. We will conduct 10,000 trials of shuffling a deck and picking cards from the top in order until one of the 4 scenarios occurs. When a win or loss is detected, we stop drawing cards, reset our counters and loop through another game.

8

In [4]:

for n in range(10000): heart_count = 0 spade_count = 0 diamond_count = 0 club_count = 0 np.random.shuffle(cards) for card in cards: if card[1] == 'H': heart_count += 1 if heart_count >= 5: win_heart += 1 break elif card[1] == 'S': spade_count += 1 if spade_count >= 4: win_spade += 1 break elif card[1] == 'D': diamond_count += 1 if diamond_count >= 3: win_diamond += 1 break else: club_count += 1 if club_count >= 3: lose += 1 break

9

Lastly, we print out our results.

10

In [5]:

print(win_heart/10000, win_spade/10000, win_diamond/10000, lose/10000)

11

0.0617 0.1553 0.3894 0.3936

Our simulation suggests that we win the big prize about 5.8% of the time, the medium prize about 15.7% of the time, the small prize about 39.3% of the time, and we lose about 39.1% of the time. This is just a simulation, since scenarios 3 and 4 are identical, we should expect that those probabilities are equal. This also supports the idea that the odds of winning *any* prize are better than 50%. In fact, our computations suggest that the odds of winning at all about about 61%.

12