# High/low between 1-10 game odds

#### winneroo

##### New Member
I'm trying to figure out the odds for a game where a number between 1 and 10 are drawn randomly, and the player must guess if the next number is higher or lower than the previous number. There can't be consecutive numbers. And to make the calculation more difficult, the player can make three incorrect guesses before the game ends.

What I need to calculate is the odds for the player reaching each steps up to 30 steps. I've played the game on an internal server and averaged about 8 steps so the odds for getting there must be roughly 50% but I need to know the exact step-by-step odds for getting up to 30 steps.

This is what I've done so far:

• If the first number is 1, the odds for getting the second number right are 9/9 = 100%
• If the first number is 2, the odds for getting the second number right are 8/9 = 89% etc.
• The worst odds I've got are for numbers 5 and 6 (5/9 = 56%).
• The average odds for getting the second number right = 78%.
I could obviously keep multiplying 78% to get cumulative odds (78%, 60%, 47%, ...) but this doesn't factor in that there can't be consecutive numbers (or does it even matter?) and that player can get three guesses wrong before the game ends.

So what are the odds of the player reaching each step up to 30 steps? #### BGM

##### TS Contributor
The problem itself can be described as a Markov Chain.

Assume that you mean the game end if you make the 4th wrong guess. (can be easily modify if you mean the 3rd instead)

In such case there are a total 41 states, namely
$$i-j, i = 0, 1, 2, 3; j = 1, 2, \ldots, 10$$
where $$i$$ representing the number of wrong guess made and $$j$$ is the current number;
and the absorption state representing the end of game.

Assume the player takes the optimal strategy; i.e. he guess "larger" if the current number is 1-5 and "smaller" if 6-10. Now you merely need to fill up the transition matrix.

To calculate the probability of ending at the $$n$$-th step, you just calculate the transition matrix to the power $$n$$, and you add up the transition probabilities to the absorption state.

#### winneroo

##### New Member
Thank you for the advice. I haven't worked with probabilities for a long time so could you help me get started with the matrix? If you added the first few steps I could probably work out the rest.