mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
February 8th, 2018 at 1:42:33 PM permalink
My friends and I roll dice in a simple game.

1st we flip a fair coin and IF Heads:
we select 3 of the faces of 1 die and try to roll the 3 other faces not selected in 7 rolls.

and IF Tails:
we select 4 of the faces of 1 die and try to roll the 2 other faces not selected in 7 rolls.

7 rolls can be:
1 die 7 times
or
4 dice 1 time followed by 3 dice the next time
or other combos of dice as long as max dice rolls = 7

The question (2 parts) is
(1)the probability of getting all 6 faces in at most 7 rolls
starting with 3 faces and starting with 4 faces.
or
(2)the probability of getting exactly 5 faces in at most 7 rolls
starting with 3 faces and starting with 4 faces.

I think that part is easy and I solved it with a transition matrix in Excel

not showing the results yet
results after 7 rolls

someone asked me if there was an easy way to do the math where most could understand the chances of success.
I used a recursion method in Excel that only uses adding and multiplication
but it still takes time to set up.

I also
did the select 4 faces 1st and crunched numbers til I got it right
for staying at 4 faces or ending at 5 faces, not getting that 6th face.
It hurt my head and was really messy looking until the last try.

I would like to see how others would approach this.
Simulation is fine too! (I also did that 1st)

Sally
I Heart Vi Hart
ThatDonGuy
ThatDonGuy 
  • Threads: 122
  • Posts: 6679
Joined: Jun 22, 2011
February 8th, 2018 at 2:55:07 PM permalink
Note that the physical number of dice is irrelevant.


From 4 faces (assume 3, 4, 5, 6 were chosen):
The probability of not rolling at least one 1 or at least one 2:
at least one 1: (5/6)^7
at least one 2: (5/6)^7
but that includes these twice:
any 1s or 2s: (4/6)^7
The total is (2 x 5^7 - 4^7) / 6^7
The probability of doing it is 1 - this value = 140070/279936

From 3 faces (assume 4, 5, 6 were chosen):
The probability of not rolling at least one 1 or at least one 2 or at least one 3:
at least one 1: (5/6)^7
at least one 2: (5/6)^7
at least one 3: (5/6)^7
but that includes each of these twice:
any 1s or 2s: (4/6)^7
any 1s or 3s: (4/6)^7
any 2s or 2s: (4/6)^7
but removing those removes all references to this:
any 1s, 2s, or 3s: (3/6)^7
The total is (3 x 5^7 - 3 x 4^7 + 3^7) / 6^7
The probability of doing it is 1 - this value = 92526/279936

mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
February 9th, 2018 at 10:33:26 AM permalink
Quote: mustangsally

(2)the probability of getting exactly 5 faces in at most 7 rolls
starting with (3 faces later) starting with 4 faces.

just thinking about each roll...

1st to warm up
to stay at 4 faces - I select 1,2,3,4 and need to roll at least one 5 and one 6
in 7 rolls should be easy like this: (4/6)^7 = about 0.058527663 or about 1 in 17

to end at 5 faces not get that 6th face
rollA = (4/6)^(roll-1)*(2/6)B = (5/6)^(7-roll)A*B
0getting 5th face on roll XNOT getting 6th face after Roll Xgetting 5th face not getting 6th
10.3333333330.3348979770.111632659
20.2222222220.4018775720.089306127
30.1481481480.4822530860.071444902
40.0987654320.5787037040.057155921
50.0658436210.6944444440.045724737
60.0438957480.8333333330.03657979
70.02926383210.029263832
..ending with 5 faces after roll 7 >>0.441107968


0.441107968

thinking out loud
1 - (stay at 4 + end at 5) = about 50% getting all 6 faces

that I find amazing

Sally
I Heart Vi Hart
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
February 9th, 2018 at 10:38:52 AM permalink
Quote: ThatDonGuy

Note that the physical number of dice is irrelevant.

yes it is. but some like to roll 2 dice at a time instead of 1 at a time.

You really have that exclusion-inclusion principle down pat. great work!
I Heart Vi Hart
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
February 9th, 2018 at 11:13:57 AM permalink
The inclusion-exclusion method that Thatdonguy presented is the most efficient way.

Since there are only 6^7 permutations you can also solve this quite easily by brute force in Excel. List out the 279,936 perms (use base 6, length 7) and count the ones that match your criteria.
It’s all about making that GTA
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
February 9th, 2018 at 11:34:55 AM permalink
Quote: Ace2

The inclusion-exclusion method that Thatdonguy presented is the most efficient way.

agree on efficient.

Here is my recursion solution in Excel for those that want to see
(I always do this after making my transition matrix solution)

https://goo.gl/A6qAyG

cell K1 is a drop-drown list
that way one can start with any number of faces (from 0 to 6. 0 takes time and starting with 6 is funny!)

Quote: Ace2

Since there are only 6^7 permutations you can also solve this quite easily by brute force in Excel. List out the 279,936 perms (use base 6, length 7) and count the ones that match your criteria.

yes, another possible solution.

had to add:
this proved to be the best way to show others
how to figure this out and can understand

*******
btw, my friends and I play this dice game
and score a win as 1 point for 4 face game and 2 points for 3 face game.
A few friends asked why 2 points for the 3 face game and I tried to explain it is close to true odds and lost them all.
The winner is first to 7 points (sometimes 11 if lots of food and drinks are handy)

Sally
Last edited by: mustangsally on Feb 9, 2018
I Heart Vi Hart
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
February 9th, 2018 at 3:25:17 PM permalink
Quote: mustangsally

(2)the probability of getting exactly 5 faces in at most 7 rolls
starting with 3 faces.

Well, counting in Excel is not only super easy and takes about a minute to do, most can easily grasp the concept and they get it!

here is for 3 faces
142632/279936 = 0.509516461

the distribution in photo
it answers the probability of ending at 5 faces after 7 rolls


interesting about starting at 2 faces
almost same probability to end at exactly 5 faces
0	128	0.000457247
1 8236 0.029421011
2 72828 0.260159465
3 141624 0.505915638 <<< 5 faces ending
4 57120 0.204046639


game on in 30 minutes!
Sally
I Heart Vi Hart
  • Jump to: