I’ll state in advance that I’m under the influence of cold medication today. Still, I didn’t think it would be a challenge to write a quick-and-dirty Python simulation to test this out.
import random
def roll(dice, sides):
roll = 0
for i in range(0, dice):
roll += random.randint(1,sides)
return roll
is_a_six = 0
total = 0
# Repeat one million times
for i in range(0, 1000000):
no_six = 1
# Roll two dice until at least one of them is a six
while no_six:
red_die = roll(2, 6)
green_die = roll(2, 6)
no_six = (red_die != 6 and green_die != 6)
# If both are six, discard one at random
if (red_die == 6) and (green_die == 6) :
if roll(1, 2) == 1:
remaining_die = green_die
else :
remaining_die = red_die
# If only one is a six, discard that one
elif red_die == 6 :
remaining_die = green_die
else :
remaining_die = red_die
# See if the remaining die is a six
if remaining_die == 6 :
is_a_six += 1
total += 1
# Display the results
ratio = round(float(total)/float(is_a_six), 2)
print("Is a six : {}").format(is_a_six)
print("Not a six : {}").format(total - is_a_six)
print("It's a six about 1/{} of the time.").format(ratio)
It returned this:
1/13? That’s an answer that wasn’t on anybody’s radar. I repeated it five times with the same result. I’m probably overlooking something really obvious.