mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 23rd, 2018 at 8:47:10 AM permalink
how to solve the below question (or bet)
(I used a Markov chain and a recursion and ran a simulation to get an answer)

and the answer to
"Somebody bet he that he could roll a total of 6 and 8, with two dice, before I could roll a total of seven twice."
https://wizardofodds.com/ask-the-wizard/179/
*****
07-17-2013
1. "What is the probability of Rolling a Sum of 6 and 8 before an opponent rolls two sums of 7s?"
"2. Roll two dice to show that the experimental probability of rolling a sum of 8 and a sum of 6 before rolling two sums of 7 is approximately 55 percent. If you’re familiar with probability theory, prove that the theoretical probability is 54.6 percent."
Quote:

Q#1
This looks to be about two players each rolling the dice
and only their roll counts towards their event(s)
in other words, A Race game.
Q#2
The book question is a popular one all over the net and in school.
To me, one or more persons rolls the dice to see which event happens first for that series of dice rolls.



https://forumserver.twoplustwo.com/25/probability/roll-six-eight-before-two-sevens-1352937/
*****
Math 361, Problem Set 2
September 17, 2010
University of Denver
3. (1.4.7) A pair of 6-sided dice is cast until either the sum of seven or eight
appears.
(a) Show that the probability of a seven before an eight is 6/11.
(b) Next, this pair of dice is cast until a seven appears twice (as a sum)
or until each of a six and an eight have appeared at least once. Show
that the probability of the six and eight occurring before two sevens
is 0.546.
http://cs.du.edu/~paulhorn/361/assn2-solns.pdf

two different questions
and
the Wizard, imo, answered Q2 (not the question asked in #179)
and answered 3b in Math 361, Problem Set 2
(b) Next, this pair of dice is cast until a seven appears twice (as a sum)
or until each of a six and an eight have appeared at least once.
Show that the probability of the six and eight occurring before two sevens
is 0.546.

'a well written question I must agree'
my answer using pari/gp
can do online too
https://pari.math.u-bordeaux.fr/gp.html
(08:42) gp > a=10/16 * 5/11; \\6or8,then other
(08:42) gp > b=10/16 * 6/11* 5/11 ;\\6or8,a 7, then other
(08:42) gp > c=6/16 * 10/16 * 5/11 ;\\a 7, then 6or8, then other
(08:42) gp > a+b+c
%4 = 4225/7744
(08:42) gp > 4225/7744.
%5 = 0.54558367768595041322314049586776859504

there should be an easy way to solve this

(IF the question was, for example,
player A rolls 2d6 first and wants one sum of 6 B4 player B rolls 2nd and wants one sum of 7, one could use the sum of a infinite geometric series to solve and that is easy and shown all over the internet. answer for this example is Player A wins with a prob of 30/61,Player B wins with a prob of 31/60 and IF Player B rolls 1st, well, that winning prob looks to be 36/61)

"Somebody bet he that he could roll a total of 6 and 8, with two dice, before I could roll a total of seven twice." being that Player A rolls 1st
and
is trying for at least one 6 and one 8
the answer must be higher than 0.546
or is it?

Sally
Last edited by: mustangsally on Jul 23, 2018
I Heart Vi Hart
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27120
Joined: Oct 14, 2009
July 23rd, 2018 at 8:58:04 AM permalink
Quote: mustangsally

how to solve the below question (or bet)

(I used a Markov chain and a recursion and ran a simulation to get an answer)



I think your handle should be Markov Sally. Yes, I agree that would be the elegant way to solve it. However, I was probably afraid at the time I posted the question that just mentioned in Markov Chain would scare off the audience. I tried to show an answer using as simple math as possible.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 23rd, 2018 at 9:13:18 AM permalink
Quote: Wizard

However, I was probably afraid at the time I posted the question that just mentioned in Markov Chain would scare off the audience. I tried to show an answer using as simple math as possible.

you answered a different question than the one asked in #179, imo

you showed an answer to this
(b) Next, this pair of dice is cast until a seven appears twice (as a sum)
or until each of a six and an eight have appeared at least once.
Show that the probability of the six and eight occurring before two sevens
is 0.546.

the answer to
"Somebody bet he that he could roll a total of 6 and 8, with two dice, before I could roll a total of seven twice."
this has yet to have an answer shown (I keep mine to myself until at least another shows their answer and solution)

I think this can be solved using the sum of an infinite geometric series
I may be wrong
Sally
I Heart Vi Hart
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 23rd, 2018 at 9:23:29 AM permalink
results of my simulation
for at least one 6 and eight is rolled by Player A who rolls 1st
B4
two 7s are rolld by Player B rolling after Player A rolls

[1] 0.5750781
>    print(end.time - start.time)
Time difference of 5.997747 mins
> p = count68/sims
> error = 3.29*sqrt(p*(1-p)/sims)
> error
[1] 0.0009897647
> p
[1] 0.5750781
> p-error
[1] 0.5740884
> p+error
[1] 0.5760679
> 1-p
[1] 0.4249219
> ##########################
> sims
[1] 2700000
> count68
[1] 1552711
> count7
[1] 1147289
> count68.1
[1] 563953
> count68.1/count68
[1] 0.3632054<<< at least 1 of either 6 or 8 was rolled


ok for now
Sally
I Heart Vi Hart
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27120
Joined: Oct 14, 2009
July 23rd, 2018 at 9:57:44 AM permalink
Sally, please check if you approve of the new wording.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Doc
Doc
  • Threads: 46
  • Posts: 7287
Joined: Feb 27, 2010
July 23rd, 2018 at 10:08:38 AM permalink
Quote: mustangsally

"Somebody bet he that he could roll a total of 6 and 8, with two dice, before I could roll a total of seven twice."


I think that if we are to be adequately nerdy, we would have to ask some questions like "Who gets to start rolling first?" and "Who can roll more times the fastest?" I mean, if I can make twenty rolls before the other guy can make his second roll, I think I have a much better chance of reaching my goal before he reaches his.




Yes, I'm just having some fun here.
;-)
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 23rd, 2018 at 10:10:38 AM permalink
Quote: Wizard

Sally, please check if you approve of the new wording.

now
that is like (I use the word 'like' a lot)
the question that can be found in a text book and the math paper I linked too.
I say you answered that question in #179

How about the actual question from
ANTHONY FROM INDIANA

it is a different type of question, very close to the text book question, but still different
as the 'odd number rolls' are for the 6 and 8 event (at least 1 of each)
and the even rolls are for the two 7s

I am looking for an answer to that (I have one but want to see how other(s) would do it)

Sally
I Heart Vi Hart
lilredrooster
lilredrooster
  • Threads: 240
  • Posts: 7094
Joined: May 8, 2015
July 23rd, 2018 at 10:11:02 AM permalink
when I found out about the correct answer to that puzzle years ago I tried for a long time to figure out if there was some way to take advantage of it while betting on craps in a casino with the bets that they allow.
and I couldn't figure out any way. I don't think there is any way to use it to your advantage. if there was it would be well known. but on the rare chance that one of you guys or gals knows one please let it fly.
the foolish sayings of a rich man often pass for words of wisdom by the fools around him
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 23rd, 2018 at 10:12:51 AM permalink
Quote: Doc

I think that if we are to be adequately nerdy, we would have to ask some questions like "Who gets to start rolling first?"

exactly. the question should leave no room for interpretation.

The text book question, I think, makes it very clear.

the bar bet version that player A rolls first followed by Player B seems to be asked more and that is how I understood it. they alternate the rolls until a winner is found (and payment collected)

of course, bar bets are that way

Sally
I Heart Vi Hart
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 23rd, 2018 at 10:15:29 AM permalink
Quote: Wizard

Sally, please check if you approve of the new wording.

btw, I am NOT saying you are wrong in your 1st answer in #179, just that you answered a different question and the new wording now fits your answer
Sally
I Heart Vi Hart
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 23rd, 2018 at 10:26:56 AM permalink
Quote: lilredrooster

when I found out about the correct answer to that puzzle years ago I tried for a long time to figure out if there was some way to take advantage of it while betting on craps in a casino with the bets that they allow.
and I couldn't figure out any way.

agree
Quote: lilredrooster

I don't think there is any way to use it to your advantage. if there was it would be well known. but on the rare chance that one of you guys or gals knows one please let it fly.

it is a classic bar bet (I hear and a few friends say so)

The reason one has the higher prob of success rolling at least one 6 and 8
is that prob of either event is 10/36 and the two 7s to get the 1st 7 is just 6/36

Sally
I Heart Vi Hart
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 23rd, 2018 at 10:41:55 AM permalink
Quote: Wizard

Sally, please check if you approve of the new wording.

and you could easily expand your answer to show the average number of rolls until the game ends
I did just that as I wanted to know (using your data)
either wins: 7.021952479 rolls
given win by 6,8: 6.891608392 rolls
given win by 7,7: 7.178446873 rolls

for the bar bet 2 player version I get
either wins: 14.24521197 rolls
given win by 6,8: 13.65067664 rolls
given win by 7,7: 15.04916522 rolls

Sally
I Heart Vi Hart
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27120
Joined: Oct 14, 2009
July 23rd, 2018 at 10:43:48 AM permalink
So the question on the table is the same thing, except the two players take turns rolling and each roll counts for the player rolling only?

Is this wording acceptable:

Players A and B take turns rolling two six-sided dice. Each roll counts towards the goal of the player rolling only. Player A has a goal to roll both a total of six and eight, in either order, and duplicates are allowed. Player B has a goal to roll a total of seven twice. The dice are rolled until either event occurs. If player A rolls first, what is the probability of player A winning? What if player B rolls first?
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 23rd, 2018 at 11:06:16 AM permalink
Quote: Wizard

So the question on the table is the same thing, except the two players take turns rolling and each roll counts for the player rolling only?

Is this wording acceptable:

Players A and B take turns rolling two six-sided dice. Each roll counts towards the goal of the player rolling only. Player A has a goal to roll both a total of six and eight, in either order, and duplicates are allowed. Player B has a goal to roll a total of seven twice. The dice are rolled until either event occurs. If player A rolls first, what is the probability of player A winning? What if player B rolls first?

yes, excellent (the Markov chain solution easy answers: What if player B rolls first? and I think the answer is a surprise!)

I know you can do this in Excel with basic math. I got stumped, that is why I used the MarkovSally method
Sally

added:
these type of questions/bets seem at 1st so simple to figure out
but once the attempt to figure it out starts, it seems not
as simple
I always start with a simulation
so for: What if player B rolls first? He says 77 rolls B4 6and8
I get [1] 0.4734789 as the prob to win
>    print(end.time - start.time)
Time difference of 4.670225 mins
> p = count7/sims
> error = 3.29*sqrt(p*(1-p)/sims)
> error
[1] 0.0009997058
> p
[1] 0.4734789
> p-error
[1] 0.4724792
> p+error
[1] 0.4744786
> 1-p
[1] 0.5265211
> ##########################
> sims
[1] 2700000
> count68
[1] 1421607
> count7
[1] 1278393

Last edited by: mustangsally on Jul 23, 2018
I Heart Vi Hart
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
July 23rd, 2018 at 1:15:31 PM permalink
Quote: Wizard

Players A and B take turns rolling two six-sided dice. Each roll counts towards the goal of the player rolling only. Player A has a goal to roll both a total of six and eight, in either order, and duplicates are allowed. Player B has a goal to roll a total of seven twice. The dice are rolled until either event occurs. If player A rolls first, what is the probability of player A winning? What if player B rolls first?

If player A goes first, the exact answer is 3,955,200 / 6,880,129 =~ 57.487%.

You can solve it writing 8 equations...1 for each state. A, C, E and G are player A rolling, the other states are player B rolling. (x,1) means player A has made nothing while player B has made 1 seven. Solve for A.

A (x,x) = 5/18D + 13/18B
B (x,x) = 1/6E + 5/6A
C (1,x) = 5/36 + 31/36D
D (1,x) = 1/6G +5/6C
E (x,1) = 5/18H + 13/18F
F (x,1) = 5/6E
G (1,1) = 5/36 + 31/36H
H (1,1) = 5/6G

To get the probability of player B winning if he/she rolls first, just set B as the initial state instead of A, and you get a loss probability of 3,623,875 / 6,880,129, so the win probability is the complement of that: 3,256,254 / 6,880,129 =~ 47.33%.
Last edited by: Ace2 on Jul 23, 2018
It’s all about making that GTA
lilredrooster
lilredrooster
  • Threads: 240
  • Posts: 7094
Joined: May 8, 2015
July 23rd, 2018 at 1:40:11 PM permalink
has anybody ever encountered 𝐭𝐡𝐞 𝟐 𝐞𝐧𝐯𝐞𝐥𝐨𝐩𝐞 𝐩𝐫𝐨𝐛𝐥𝐞𝐦

You are given two indistinguishable envelopes, each containing money, one contains twice as much as the other. You may pick one envelope and keep the money it contains. Having chosen an envelope at will, but before inspecting it, you are given the chance to switch envelopes. Should you switch?

one way to approach: you don't know what's in the envelope you picked. but let's say it's $50. if you have the lesser envelope and you switch you will get the better envelope which has $100. so you will gain $50. If you had the better envelope and you switch you would get the lesser envelope which has $25 and you would lose $25.

so by switching you could either gain $50 or lose $25.

so it seems like the best plan is to switch envelopes. right?

it seems like some pretty good logic. if it's not right why not?
the foolish sayings of a rich man often pass for words of wisdom by the fools around him
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27120
Joined: Oct 14, 2009
July 23rd, 2018 at 2:05:37 PM permalink
Quote: Ace2

If player A goes first, the exact answer is 3,955,200 / 6,880,129 =~ 57.487%.



I agree. To prove I solved it too, here are more decimal places: 0.57487294.

If B goes first I get the probability A winning is 0.52671614.

I solved by the same method as Ace.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
July 23rd, 2018 at 2:15:22 PM permalink
Let's say the 2 players roll separate sets of dice simultaneously.

What's the probability A wins and what's the probability of a tie?
It’s all about making that GTA
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 23rd, 2018 at 2:49:22 PM permalink
Quote: Wizard

I agree. To prove I solved it too, here are more decimal places: 0.57487294.

If B goes first I get the probability A winning is 0.52671614.

I solved by the same method as Ace.

No one would doubt you about solving it also
You mentioned 1st how you would do it, then removed it
0.574872942
higher than the roll being for both players.
I knew that was the case from just rolling the dice.
It was harder to win trying to get 77 when player1(6&8) went first

no wonder this bar bet cashes big time for 6&8!
*****
here is my Excel matrix and recursion in Google (4 those so interested)
https://goo.gl/amR95r

the probabilities from the 8 states
from: p1,0- p2,0 = player1 with 0 collected- player2 with 0 collected
68 wins77 winsfrommean # of rolls
0.5748729420.425127058p1,0- p2,014.24521197
0.2859321390.714067861p1,0- p2,78.854746474
0.7417360920.258263908p1,6or8- p2,09.939263639
0.4918032790.508196721p1,6or8- p2,76.590163934
0.5267161420.473283858p2,0- p1,014.34680106
0.2382767820.761723218p2,7- p1,08.378955395
0.7000806230.299919377p2,0- p1,6or810.38108035
0.4098360660.590163934p2,7- p1,6or86.491803279


Sally
I Heart Vi Hart
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 23rd, 2018 at 3:20:31 PM permalink
Quote: Ace2

Let's say the 2 players roll separate sets of dice simultaneously.

yes, there are many other variations one can come up with. I have 12 of them currently

I did NOT think of yours... this variation has a 'feel' of being closer to fair (because of the tie)

Quote: Ace2

What's the probability A wins and what's the probability of a tie?

coming soon

Sally
I Heart Vi Hart
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
July 23rd, 2018 at 4:54:46 PM permalink
Though I haven't verified this, my initial calculation is:

A wins...........80,875 / 160,003
Tie.....................7,025 / 160,003
B Wins..........72,103 / 160,003

This is actually a bit easier than the last calc since you don't have to distinguish which player is rolling, so there are only 4 states instead of 8.

A (xx) = 65/108A + 25/108B + 13/108C + 5/108D
B (1x) = 5/36 + 155/216B + 31/216D
C (x1) = 155/216C + 25/216D
D (11) = 25/216 + 155/216D + 5/216E

E is a tie.
It’s all about making that GTA
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 23rd, 2018 at 7:25:18 PM permalink
Quote: Ace2

This is actually a bit easier than the last calc since you don't have to distinguish which player is rolling, so there are only 4 states instead of 8.

agree. Yahoo!

Quote: Ace2

C (x1) = 155/216C + 25/216D

I think your error is this
i got
C (x1) = 65/108C + 25/108D
(and it shows. my simulations were very close at 1st so I figured something you had was incorrect)
> p = count68/sims
> error = 3.29*sqrt(p*(1-p)/sims)
> error
[1] 0.0009997312
> p
[1] 0.5262815
> p-error
[1] 0.5252818
> p+error
[1] 0.5272812
> #1-p
> ##########################
> sims
[1] 2700000
> count68
[1] 1420960
> count7
[1] 1149491
> count7/sims
[1] 0.4257374
> tie
[1] 129549
> tie/sims
[1] 0.04798111

my transition matrix (rows sum to 1)



so,
6,8 wins: 0.526716142
7,7 wins: 0.425127058
tie: 0.048156801

more
6,87,768-77frommean rolls
0.5267161420.4251270580.0481568010,07.410042457
0.7000806230.2582639080.0416554691,05.340499866
0.2382767820.7140678610.0476553560,14.570339306
0.4098360660.5081967210.0819672131,13.540983607


I was off on this one too, going by feel

Sally
I Heart Vi Hart
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
July 23rd, 2018 at 9:47:22 PM permalink
Good catch. Apparently when I wrote the equation for C, I was thinking 5 in 36 ways for player A to advance, when of course it’s 10 in 36.

But the final result seemed reasonable so I didn’t bother checking my math. That’s why people should check their math
It’s all about making that GTA
  • Jump to: