The Grey Labyrinth is a collection of puzzles, riddles, mind games, paradoxes and other intellectually challenging diversions. Related topics: puzzle games, logic puzzles, lateral thinking puzzles, philosophy, mind benders, brain teasers, word problems, conundrums, 3d puzzles, spatial reasoning, intelligence tests, mathematical diversions, paradoxes, physics problems, reasoning, math, science.

   
The Grey Labyrinth Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    RegisterRegister  
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Another probability question

 
Reply to topic    The Grey Labyrinth Forum Index -> Visitor Submitted Puzzles
View previous topic :: View next topic  
Author Message
Antrax
ESL Student



PostPosted: Fri May 01, 2009 6:39 am    Post subject: 1 Reply with quote

This one I don't know the answer to.

Alice and Bob are playing the following game: toss two fair dice. If they come up 6 6, Alice wins. If their sum is 7 and their sum was 7 last roll, Bob wins. Otherwise, keep playing.
The question is, what's Alice's chance of winning the game.

My own approach was to note that [from the second turn onward, their chances of winning (given that they are still playing) are equal, so I figured Alice's chance is her chance to win on the first turn, plus 35/72. ]
However, the simulation shows a greater percentage than this would indicate, and I can't blame it all on C's RNG. So, what's the correct calculation?
_________________
After years of disappointment with get rich quick schemes, I know I'm gonna get rich with this scheme. And quick!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Duke Gnome
Daedalian Member



PostPosted: Fri May 01, 2009 9:36 am    Post subject: 2 Reply with quote

At any time when a 7 wasn't the last rolled.

Alice's chance of winning before a reset/Bob victory=1/36=6/216
Bob's Chances of winning before reset/Alice victory=1/36+(1/6*1/36)=7/216

So Alice has a 6/13 chance of beating Bob.
Back to top
View user's profile Send private message
Antrax
ESL Student



PostPosted: Fri May 01, 2009 10:19 am    Post subject: 3 Reply with quote

Mustn't Alice have a higher chance of winning?
_________________
After years of disappointment with get rich quick schemes, I know I'm gonna get rich with this scheme. And quick!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Duke Gnome
Daedalian Member



PostPosted: Fri May 01, 2009 10:23 am    Post subject: 4 Reply with quote

Yes, I mixed the names up Neutral

My figures were based on Alice needing the 7s
Back to top
View user's profile Send private message
THUDandBLUNDER
Threefold Repetition



PostPosted: Sun Sep 12, 2010 4:41 pm    Post subject: 5 Reply with quote

Antrax wrote:
However, the simulation shows a greater percentage than this would indicate, and I can't blame it all on C's RNG. So, what's the correct calculation?

Calculating Bob's chances of winning, I get a GP with first term (6/36) 2 , as there are 6 ways to throw a 7 with two dice.
The common ratio is a bit trickier.
Denoting a pair of throws of two dice by (x,y), Alice wins if they are (12,any) or (any, 12).
Probability of this = 1/36 + 1/36
But (12,12) has been counted twice.
Hence probability of Alice winning during a pair of throws = 1/36 + 1/36 - (1/36) 2 = 71/1296
Probability of Bob winning during a pair of throws = probability of (7,7) = (6/36) 2 = 36/1296
So probability that neither win during a pair of throws = common ratio = 1 - (71 + 36)/1296 = 1189/1296
Sum to infinity = a/(1 - r) = 36/107
Hence Alice wins with probabilty 71/107 = 66.355%

Does this agree with your simulation?
.
Back to top
View user's profile Send private message
Chuck
Daedalian Member



PostPosted: Sun Sep 12, 2010 6:25 pm    Post subject: 6 Reply with quote

My simulation has Alice winning about 53.9% of the time.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Zag
Unintentionally offensive old coot



PostPosted: Sun Sep 12, 2010 7:07 pm    Post subject: 7 Reply with quote

Chuck, that's (nearly) what I get, too.

T and B, when you look only at pairs of rolls, you are missing some of Bob's wins, where the second roll is a 7, then the first roll of the next pair.

This was my approach:
1. Make a state diagram with 4 states:
State X: Last roll was not a 7, initial state.
State Y: Last roll was a 7.
State A: Alice wins
State B: Bob wins.

2. Draw the appropriate arrows between them, and label each arrow with the probability of following that arrow. Don't forget the arrow that goes from state X to state X, with 29 / 36 as the label.

3. Each letter represents the chance of Alice winning when in that state.
A = 1
B = 0
X = 1 / 36 + 1 / 6 Y + 29 / 36 X
Y = 1 / 36 + 29 / 36 X

Substituting for Y:
X = 1 / 36 + 1 / 6 ( 1 / 36 + 29 / 36 X) + 29 / 36 X

Do a bunch of algebra (which I'm hoping I did correctly), and you end up with

X = 7/13 ~= 0.538461 (repeating)
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Chuck
Daedalian Member



PostPosted: Sun Sep 12, 2010 7:19 pm    Post subject: 8 Reply with quote

I had Alice win 8,616,762 of 16,000,000 simulations which is 53.8547625%. That's real close to Zag's calculation.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
referee
June 21st, 2004 Member



PostPosted: Sun Sep 12, 2010 7:41 pm    Post subject: 9 Reply with quote

What Zag did is called a Markov Chain

You have a transition matrix and apply it to the starting vector until it stabilizes.


Code:

29/36  1/6  1/36    0
29/36   0   1/36   1/6
  0     0     1     0
  0     0     0     1


And the initial vector is 1 0 0 0
_________________
Jan 21st, 2008: The pillaging continues.
Mar 4th, 2008: Rest in Peace, Gary Gygax. May your dice always roll a natural 20 wherever you are.

Be the Ultimate Ninja! Play Billy Vs. SNAKEMAN today!
Back to top
View user's profile Send private message Send e-mail
Zag
Unintentionally offensive old coot



PostPosted: Sun Sep 12, 2010 8:12 pm    Post subject: 10 Reply with quote

LOL. referee, I have no idea what you meant there. I like probability questions, but most of it is intuition and self-taught. And I don't know what one would do with the matrix. So, are you agreeing that my answer is correct, or not?
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
duke gnome*
Guest



PostPosted: Sun Sep 12, 2010 11:44 pm    Post subject: 11 Reply with quote

Apart from the mixup of names I don't know what you guys are finding wrong with post 2, and why you want to complicate the simple logic.
Back to top
Zag
Unintentionally offensive old coot



PostPosted: Sun Sep 12, 2010 11:56 pm    Post subject: 12 Reply with quote

Nothing at all. My first quick glance at it was flawed, and then I never looked back at it. I had thought that you hadn't taken the more complex cases into account, but that was because it didn't use the approach I expected. I agree your approach is simpler (and therefore better). Also, it was first.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
referee
June 21st, 2004 Member



PostPosted: Mon Sep 13, 2010 12:05 am    Post subject: 13 Reply with quote

you take the vector [1 0 0 0] (The game starts in state X, with probability 1), and multiply by the transition matrix. This yields the probability of each state after turn 1.

Then you take this vector and multiply by the transition matrix again, yielding the probability of we being in each state after turn 2.

You keep multiplying by the transition matrix, and at some point it will stabilize. (You better program that), and that will show us the probability of each state being the final state.
_________________
Jan 21st, 2008: The pillaging continues.
Mar 4th, 2008: Rest in Peace, Gary Gygax. May your dice always roll a natural 20 wherever you are.

Be the Ultimate Ninja! Play Billy Vs. SNAKEMAN today!
Back to top
View user's profile Send private message Send e-mail
Display posts from previous: by   
Reply to topic    The Grey Labyrinth Forum Index -> Visitor Submitted Puzzles All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Site Design by Wx3