In the game “Drop Dead,” you roll
a number of six-sided dice. If a roll
does not include any 2s or 5s, you
add the sum of the dice to your
score and roll all of the dice again.
If your roll does include 2s or 5s,
you receive no points for that roll,
the dice with 2s or 5s are discarded,
and the remaining dice are rolled again. You repeat this procedure until all dice have been discarded.
If you start with five dice, what is your
expected score by the time you have
discarded all of your dice?
clearvars
for n= 1:10
s=0;
for trial=1:10000000
remain=n;
while remain>0
had25=false; score=0; ct25=0;
for i=1:remain
die=randi(6);
if die==2 || die==5
had25=true;
ct25=ct25+1;
else
score=score+die;
end
end
if had25
remain=remain-ct25;
else
s=s+score;
end
end
end
avg=s/trial;
fprintf('%2d %7.5f\n',n,avg)
end
finds, after 10 million trials of each number of dice from 1 to 10:
n exp.Val.
1 7.00197
2 11.20648
3 13.70308
4 15.19319
5 16.06568
6 16.57401
7 16.86742
8 17.04928
9 17.13764
10 17.19491
so after 10 million trials, the average for 5 dice was 16.06568.
A simulation with 100 million trials of 5 dice produced an average of 16.06577.
I had it display the games for a run of 20:
shown scores
faces
5 1 1 1 1 0
3 4 5 4 0
1 4 1 6
1 1 1 3
2 2 2 0
9 This set scored a total of 9.
2 2 2 6 5 0
4 4
2 0
4
2 1 6 5 4 0
2 1 4 0
6 2 0
2 0
0
3 1 5 3 6 0
3 4 1 3 11
1 5 6 3 0
5 2 4 0
5 0
11
4 3 2 3 3 0
3 4 5 3 0
3 1 1 5
2 2 4 0
6 6
6 6
3 3
2 0
20
5 5 5 5 1 0
5 0
0
3 2 1 5 2 0
1 4 5
6 4 10
5 1 0
6 6
4 4
5 0
25
1 5 5 1 4 0
2 4 3 0
3 2 0
2 0
0
1 6 4 6 1 18
6 5 4 3 2 0
5 2 1 0
5 0
18
5 5 4 3 3 0
5 2 5 0
0
5 6 4 4 6 0
3 1 6 4 14
3 6 2 4 0
4 3 1 8
1 3 2 0
5 3 0
6 6
5 0
28
4 2 6 2 6 0
2 3 1 0
4 2 0
1 1
5 0
1
3 4 3 4 1 15
6 5 5 5 3 0
4 4 8
4 2 0
2 0
23
3 2 5 6 1 0
4 1 5 0
6 1 7
6 1 7
5 5 0
14
4 6 6 4 1 21
2 2 1 1 4 0
6 3 3 12
6 6 5 0
6 5 0
3 3
4 4
2 0
40
2 5 4 3 4 0
5 4 4 0
4 4 8
1 5 0
6 6
3 3
6 6
3 3
6 6
3 3
3 3
2 0
38
1 2 5 5 5 0
1 1
6 6
6 6
5 0
13
1 3 5 5 2 0
2 5 0
0
3 4 2 2 5 0
5 6 0
1 1
2 0
1
1 3 2 6 1 0
1 4 5 2 0
2 3 0
2 0
0
5 12.25000
The average for this small run of 20 games was 12.25.
(the 5 at the bottom is the initial number of dice.
|
Posted by Charlie
on 2024-12-01 17:16:09 |