A thought experiment in probability by Leonardo Barichello: two people are stranded on an island with only one banana to eat. To decide who gets it, they agree to play a game. Each of them will roll a fair 6-sided die. If the largest number rolled is a 1, 2, 3 or 4, then player 1 gets the banana. If the largest number rolled is a 5 or 6, then player 2 gets it. Which player has the better chance?

Perhaps somewhat surprising, but player 2 has the better chance of winning the game. The table below lists the 36 possible outcomes of two rolls with a 6-sided die. With a fair die, each of these 36 possible outcomes has an equal chance of being rolled. Of these, there are 16 possible outcomes where player 1 wins (44.4%, indicated in green) and 20 possible outcomes where player 2 wins (55.6%, indicated in blue).

roll1 roll2 winner
1 1 1
1 2 1
1 3 1
1 4 1
1 5 2
1 6 2
2 1 1
2 2 1
2 3 1
roll1 roll2 winner
2 4 1
2 5 2
2 6 2
3 1 1
3 2 1
3 3 1
3 4 1
3 5 2
3 6 2
roll1 roll2 winner
4 1 1
4 2 1
4 3 1
4 4 1
4 5 2
4 6 2
5 1 2
5 2 2
5 3 2
roll1 roll2 winner
5 4 2
5 5 2
5 6 2
6 1 2
6 2 2
6 3 2
6 4 2
6 5 2
6 6 2

Assignment

In an extension to this thought experiment, both players roll a fair $$n$$-sided die ($$n \geq 4$$). The sides of the die are marked with 1 to $$n$$ eyes. The outcome of a roll with this die is represented as an integer (int) between 1 and $$n$$.

multisided dice
Dice with a different number of sides.

Player 1 wins the game if the roll of both players is less than or equal to an upper limit $$L \in \mathbb{N}$$ ($$1 \leq L \leq n$$) that has been fixed in advance. Otherwise, player 2 wins the game. Your task:

Example

>>> has_won(3, 2, 4)
True
>>> has_won(1, 5, 4)
False

>>> winning_outcomes(6, 4)
(16, 20)

>>> odds(6, 4)
(44.44444444444444, 55.55555555555556)

>>> winner(6, 4)
2

Epilogue

What kind of probability are people talking about when they say something has "almost no chance" or it's "almost certain"? This chart1 brilliantly explains visualizing the perceptions of probability.

perceptions of probability
Different perceptions of probability.

Resources