Actual odds of making it to the final room

probability

This question comes from my wanting to understand the true odds of this game.

I'm making a game on a Minecraft server that is based on Iskall85's RUN game from the Hermitcraft series. Here's how the game works…

Players have a 50/50 chance of the front door opening after they pay so they can play a run through of the game.
In the 1st room, they will trigger a 50/50 chance that they will be killed and have to start over, or they will make it to the next room.

The 2nd room has 2 50/50 triggers to either kill them or let them move on…and both must be passed in order to move on.

The next 2 rooms will require some skill needed to complete and I'll have to try to figure out how to work out the odds on those later.

Since each Failure ends the run, I feel like the odds should be along this line:

Front Door 1st room 2nd Room 1st trigger 2nd room 2nd trigger
F
S F
S S F
S S S F
S S S S

Would this mean that there is a 1 in 5 chance of making it through the 2nd room completely? There would be no further outcomes if they fail at any point, so those extra chances shouldn't count…right?

Best Answer

With your latest remark, we should count the number of times a person will have to pay for playing the game before success, that is why I said that the probability will be much lower with returning to start after each failure. We shall need to proceed step by step, starting with, s_0, and moving step by step to ultimately get to s_4

The equations to be solved for this game will be as below:
The first equation can be understood as saying that with $1$ payment, there is a probability of $1/2$ of moving to $s_1$ (stage $1$) or returning to start, needing to pay again. And so on until you eventually jump from $s_3$ to success

$\displaylines {s_0 =1+ (1/2)*s_1 + (1/2)*s_0\\ s_1=1+ (1/2)*s_2 + (1/2)*s_0\\ s_2=1+(1/2)*s_3 + (1/2)*s_0\\s_3= 1 +(1/2)*s_0} $

This yields $s_0=30$, which means that the player will have to pay $30$ times on an average before "success" which implies a probability of $\Large\frac1{30}$ rather than $\Large\frac 1{16}$


Simplified answer

Instead of many equations, we can get one general equation

Denote the expected number of tosses to get a run of $n$ successive heads as $E(n)$

Then from $E(n-1)$, with one toss, we are either done, or with probability $1/2$, we have to start all over again, so

$E(n)= E(n-1)\;+1 + (1/2)*E(n)$

This simplifies to $E(n) = 2[E(n-1)\;+1],$ so

$E(1)=2,$
$E(2) = 2*3 = 6$,
$E(3) = 2*7 = 14$,
$E(4)= 2*15 = 30$

and $Pr = \Large\frac 1{30}$

Note that you can now easily extend the computations for larger runs, as you have hinted will be needed afterwards

Related Question