d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Anyone Good At Math
12Next
Add Reply New Topic New Poll
Member
Posts: 167
Joined: Oct 2 2014
Gold: 0.00
Nov 17 2014 09:59pm
need help with a probability problem

This post was edited by 2wo1ne on Nov 17 2014 09:59pm
Member
Posts: 21,893
Joined: Mar 27 2009
Gold: 12,408.00
Nov 17 2014 10:01pm
Post it up.
Member
Posts: 167
Joined: Oct 2 2014
Gold: 0.00
Nov 17 2014 10:05pm
There are two players and an N sided die. They take turns rolling the die. The player that does not improve the value from the previous roll loses. What is the probability that the first player wins?

This post was edited by 2wo1ne on Nov 17 2014 10:08pm
Member
Posts: 38,019
Joined: Feb 14 2011
Gold: 6.90
Nov 17 2014 10:06pm
Quote (2wo1ne @ Nov 17 2014 11:05pm)
There are two players and an N sided die. They take turns rolling the die. The player that does not improve their value from their previous roll loses. What is the probability that the first player wins?


50%?
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Nov 17 2014 10:21pm
Quote (Uguu @ Nov 17 2014 11:06pm)
50%?


intuitively, the more you roll, the more likely you are to lose. since player 1 rolls before player 2, player 1 is more likely to lose. so i'm not sure where you got 50% from.

This post was edited by carteblanche on Nov 17 2014 10:21pm
Member
Posts: 21,893
Joined: Mar 27 2009
Gold: 12,408.00
Nov 17 2014 10:50pm
So in order for the first player to win, the second player has to roll lower than the first player. If the first player wins, then the game will be lost on an even roll. Calculate the probability of a good roll on every odd roll and a bad number on every even roll and add them all up (i.e. prob of 2 rolls + 4 rolls + 6 rolls + 8 rolls....will eventually be zero). This is a function of N.

So player one rolls. This problem gets fairly tricky here because you don't know what they rolled. Let's say they roll x, and x is some integer between 1 and n. The probability of the second person losing on the next roll would be (x)/n, while the probability of them not losing is (n-x)/n.

We keep the probability of player 2 losing on roll 2, which is x/n.

Player 2 rolls a y and doesn't lose. The probability of player 1 rolling a non-losing number is...(n-y)/n. Player 1 rolls z. Then player 2 must lose on roll 4, and the probability of that happening is z/n. So to get to player 2 losing on exactly roll 4 we get (n-x)(n-y)(z)/n^3

Don't know how this converges. I would say that your problem is not answerable as prompted. Every roll's probability is based on all previous roll values, which are unknown and running probability on every possibility is stupid unless N is small, like 6.

Calculating player 1's chance of winning on a 6 sided die is fairly simple, albeit still tedious.



For a 6 sided die:
Player 1 rolls a 6 first roll and wins: 1/6
Player 1 rolls a 5 first roll, player 2 must roll a 1-5, 5/36
Player 1 rolls a 4 first roll, player 2 must roll a 1-4, 4/36
Player 1 rolls a 3 first roll, player 2 must roll a 1-3, 3/36
Player 1 rolls a 2 first roll, player 2 must roll a 1-2, 2/36
Player 1 rolls a 1 first roll, player 2 must roll a 1, 1/36
Sum up all of these above and we get the probability of player 1 winning to be: appx 58.33% (21/36)
It appears to be something along the lines of [n+n-1+n-2+n-3+n-4........]/n^2 which SHOULD be n(n+1)/2n^2 Ans.
There are a lot of terms after this, this is just 2 probabilities although there are a lot of permutations that must be considered. The probability is really low (1/36^2 so we can neglect it all).
Player 1 rolls a 3 first roll, player 2 rolls a 4, player 1 rolls a 5, player 2 rolls a 1-5. 5/36^2
Player 1 rolls a 1 first roll, p2 rolls 2, p1 rolls 3, p2 rolls 4, p1 rolls 5, p2 rolls 1-5. 5/36^3

This post was edited by Dontrunaway on Nov 17 2014 11:19pm
Member
Posts: 167
Joined: Oct 2 2014
Gold: 0.00
Nov 17 2014 11:10pm
Quote (Dontrunaway @ Nov 18 2014 12:50am)
So in order for the first player to win, the second player has to roll lower than the first player. If the first player wins, then the game will be lost on an even roll. Calculate the probability of a good roll on every odd roll and a bad number on every even roll and add them all up (i.e. prob of 2 rolls + 4 rolls + 6 rolls + 8 rolls....will eventually be zero). This is a function of N.

So player one rolls. This problem gets fairly tricky here because you don't know what they rolled. Let's say they roll x, and x is some integer between 1 and n. The probability of the second person losing on the next roll would be (x)/n, while the probability of them not losing is (n-x)/n.

We keep the probability of player 2 losing on roll 2, which is x/n.

Player 2 rolls a y and doesn't lose. The probability of player 1 rolling a non-losing number is...(n-y)/n. Player 1 rolls z. Then player 2 must lose on roll 4, and the probability of that happening is z/n. So to get to player 2 losing on exactly roll 4 we get (n-x)(n-y)(z)/n^3

Don't know how this converges. I would say that your problem is not answerable as prompted. Every roll's probability is based on all previous roll values, which are unknown and running probability on every possibility is stupid unless N is small, like 6.

Calculating player 1's chance of winning on a 6 sided die is fairly simple, albeit still tedious.

I would say that the odds of winning is something along the lines of the summation of x/n^x from x to n would be close, bought a really rough estimate.


Thanks a lot! ill see if i can work out a concrete answer with this. Again i appreciate it!
Member
Posts: 1,995
Joined: Jun 28 2006
Gold: 7.41
Nov 17 2014 11:14pm
Quote (2wo1ne @ Nov 18 2014 12:10am)
Thanks a lot! ill see if i can work out a concrete answer with this. Again i appreciate it!


Take a look at this if you are interested in an indepth explanation

http://cr4.globalspec.com/blogentry/21768/Roll-of-the-Dice-Newsletter-Challenge-January-2013
Member
Posts: 21,893
Joined: Mar 27 2009
Gold: 12,408.00
Nov 17 2014 11:22pm
Quote (Minkomonster @ Nov 17 2014 11:14pm)
Take a look at this if you are interested in an indepth explanation

http://cr4.globalspec.com/blogentry/21768/Roll-of-the-Dice-Newsletter-Challenge-January-2013


Oh well, I tried. :P
Member
Posts: 38,019
Joined: Feb 14 2011
Gold: 6.90
Nov 18 2014 12:43am
Quote (carteblanche @ Nov 17 2014 11:21pm)
intuitively, the more you roll, the more likely you are to lose. since player 1 rolls before player 2, player 1 is more likely to lose. so i'm not sure where you got 50% from.


there's 2 players.
50% chance to win and lose here brah
since there's 2 choice for who wins

Quote (2wo1ne @ Nov 17 2014 11:05pm)
There are two players and an N sided die. They take turns rolling the die. The player that does not improve the value from the previous roll loses. What is the probability that the first player wins?




This post was edited by Uguu on Nov 18 2014 12:43am
Go Back To Homework Help Topic List
12Next
Add Reply New Topic New Poll