2
$\begingroup$

Let's say I'm playing a dice game with a friend. We each get two dice, and we roll all of our dice at the same time. You get one point for each 6 you have. First to score at least three points wins. If both of us get to 3 (or more) points on the same trial, it is a tie.

  1. What is the probability that I win? lose? tie?
  2. What is the expected number of rolls required for either of us to win?
  3. If I replace one of my dice with an unfair dice which rolls 6 2/6 times, how does that affect the above answers?

More info: I'm actually trying to design a slot game (5 reels). If a particular symbol appears on reels 1 or 2, the player gets a point, if the symbol appears on reels 4 or 5 the computer gets a point. First to three points wins. In order to balance the payout of the machine, I need to know the number of trials expected before the game ends, and how often the player wins vs the computer wins or ties.

$\endgroup$
  • 1
    $\begingroup$ For 1. by symmetry you know that the probability that you lose is the same as the probability that you win. What's left to figure out is the probability that you tie. If $p_t$ is the probability of a tie, then the probability that you win is $\frac{1}{2}(1-p_t)$. $\endgroup$ – TravisJ Jun 22 '15 at 19:56
1
$\begingroup$

This is an example of an absorbing Markov chain, where the states are Player 1 wins, Player 2 wins, tie, and then any combination of Player 1 having 0/1/2 points and Player 2 having 0/1/2 points. We can construct a Markov matrix where the jth entry in ith row is the probability of going from state i to state j after one two-die roll by both players. We can determine these probabilities pretty easily, since the player scores are independent of each other - e.g. the probability of going from P1 having 1 point and P2 having 0 points to P1 having 2 points and P2 having 2 points is simply the product of the probabilities of P1 getting 1 point and P2 getting 2 points.

Once we have the matrix, we can apply the formulas for Markov matrices to answer your questions - by raising the Markov matrix to an infinite power (or approximating the result of this by raising it to a high power) we obtain a matrix which gives us the expected distributions of the final state given a starting state, and we can also obtain the expected number of steps needed to reach an absorbing state (in this case, either player reaching 3 points) from a starting state by summing the state's corresponding row of the fundamental matrix. The exact formulas can be found on the wiki pages for Markov chains and absorbing Markov chains.

Here's a download link to the Excel sheet I used to actually runs these calculations - if you change the value in Q1 to the probability of rolling a 6 on any one die in this example, it will generate for you the probabilities of either player winning or a tie, as well as the expected number of rolls needed to end the game. For p = 1/6, either player has a 46.6% chance of winning, and there is a ~6.8% chance of a tie, and games on average will take ~6.69 rolls. For p = 1/3 the probability of a win is ~42.4%, of a tie is ~15.2%, and the expected number of rolls is ~3.61.

$\endgroup$
  • $\begingroup$ Amazing. Thank you. I actually understand most of this answer (which surprises me). This excel sheet is super useful. I've replaced the probabilities based on the reel distributions for my slot machine and it seems to be working. $\endgroup$ – Miguel Maglutac Jun 23 '15 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.