All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
Toss The 2s and 5s (Posted on 2024-12-01) Difficulty: 3 of 5
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?

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Analytic Solution for up to 3 Dice, but then error | Comment 2 of 4 |
I found the same simulation results as Charlie ± precision error since I did only 10^5 trials.
But I wanted to attempt an analytic solution.

My results for 1, 2, or 3 dice agree with the simulation results, but there must be an error when I increased to 4 dice.
(Starting with 3 dice, I used Wolfram Alpha for the arithmetic)

Call Sn the expected score for n dice.
Obviously S0 = 0
S1 = (2/3)*(7/2 + S1) = 7/3 + (2/3)S1
S1 = 7   for one die

S2 = (2/3)^2((7/2)*2 + S2) + (1/3)(2/3)(2)(0 + S1)
   = (4/9)(7)  +  (4/9)S2  +  (4/9)(7)
   = 56/9 + (4/9)S2
   = (9/5)(56/9) = 56/5 = 11.2  for two dice

S3 = 1*(2/3)^3((7/2)*3 + S3)
    + 3*((1/3)(2/3)^2) (0 + S2)
    + 3*((1/3)^2(2/3)) (0 + S1)
   = (8/27)(21/2 + S3)
    + (12/27)(56/5)
    + (6/27)(7)
   = 1302/95 = 13.705263157894738   for three dice

S4 = 1*(2/3)^4((7/2)*4 + S4)
    + 4*(1/3)(2/3)^3 (0 + S3)
    + 6*(1/3)^2*(2/3)^2 (0 + S2)
    + 4*(1/3)^3(2/3) (0 + S1)
   = 1*(16/81) ((14 + S4)
       + 4*(8/81) (0 + 1302/95)
       + 6*(4/81) (0 + 56/5)
       + 4*(2/81) (0 + 7)
S4 = 115360/20007 = 5.765981906332784
     which disagrees with the Sim results
     (should be about 15.24 so there is an error)


my simulation results:
1 7.03203
2 11.19352
3 13.68761
4 15.24479
5 16.0118
6 16.4506
7 16.91077
8 17.0097
9 16.99697
10 17.24173

my code:
-----------
reps = 100000
for dice in range(1,11):
    ct = 0
    score_total = 0
    for rep in range(reps):
        ct += 1
        dicenow = dice
        thisscore = 0
        while dicenow > 0:
            roll = [randint(1,6) for n in range(dicenow)]
            bads = roll.count(2) + roll.count(5)
            if bads > 0:
                dicenow -= bads
                continue
            thisscore += sum(roll)
        score_total += thisscore
    print(dice,score_total / ct)

  Posted by Larry on 2024-12-02 08:51:50
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information