I devised a probability problem for myself to help me better understand conditional probability (because I am evidently missing something very crucial).
The rules:
- $k$ players are arranged in a circle, each with a gun trained on the player in front of them.
- Each player only has one bullet in their gun. Only one player shoots at a time, in the order they are arranged in the circle.
- Each player has a probability $p_n$ of their bullet hitting their target (n $\in{[1, k]}$).
- Each player can only shoot at the player in front of them (aka the one they have their gun trained on).
- If a player dies, the player next in the circle fires.
- The game ends when every bullet is fired (so max $k$ gunshots).
I manually worked out the scenarios for $k = 2, 3, 4, 5$. See below for the picture. (The number of possible outcomes for each $k$ follows a Fibonacci sequence, which is cool, but not unexpected.) What I'm having trouble with is working out the probabilities--if the $p_n$ for each player is distinct, how do I work out the probability of Player $n$ surviving?
Cases for k = 2, 3, 4, and 5 players.
My attempt for $k = 2$:
$p_1 + (1-p_1)(1-p_2)$ = probability of Player 1 surviving.
Is this the correct calculation? I don't think so.
There is also the arrangement (not shown in the picture above) where the Player 2 fires first, then Player 1 fires. In this second case, probability of Player 1 surviving (by my faulty logic) is:
$(1-p_2)(p_1) + (1-p_2)(1-p_1)$
And so would the final probability, considering all cases for $k = 2$, of Player 1 surviving be: $p_1 + (1-p_1)(1-p_2) + (1-p_2)(p_1) + (1-p_2)(1-p_1)$ ?
Thank you!
Let's just consider the case where Player $1$ shoots first. But let the number of players be $k$ for arbitrary $k \geq 2.$
To help keep the notation concise, let $s_n$ be the probability that player $n$ survives.
Player $1$ certainly shoots at player $2,$ because player $1$ always survives long enough to shoot. Player $2$ survives if and only if player $1$ misses. Therefore $$s_2 = 1 - p_1.$$
But every other player shoots if only if they survive, and therefore player $n$ (for $n \geq 3$) survives if player $n-1$ dies (probability $1 - s_{n-1}$) or if player $n-1$ survives and misses (probability $s_{n-1}\left(1 - p_{n-1}\right)$). These are mutually exclusive outcomes, so we can add their probabilities:
$$ s_n = \left(1 - s_{n-1}\right) + s_{n-1}\left(1 - p_{n-1}\right) = 1 - s_{n-1}p_{n-1}. \tag1 $$
This agrees with the observation that player $n$ dies if and only if player $n-1$ survives and hits, so we can subtract that probability from $1$ to find the probability that player $n$ survives.
The calculation for player $1$ is similar except that the player behind player $1$ is player $k$, so
$$ s_1 = \left(1 - s_k\right) + s_k\left(1 - p_k\right) = 1 - s_k p_k. $$
This provides a $k$-step procedure to calculate all the probabilities. In the first step you compute $s_2.$ Next, you compute $s_3,$ then $s_4,$ and so forth until all the survival probabilities up to and including $s_k$ are known, and then you compute $s_1.$
You can use just one equation if you make the following change in notation: the probability that player $1$ survives is called $s_{k+1},$ while $s_1 = 1$ is not a survival probability. Then all survival probabilities can be computed by Equation $(1).$
If the probabilities $p_n$ follow some kind of formula then you might be able to come up with a more direct way of computing each $s_n,$ like the way we can state a formula for the $n$th Fibonacci number. For example, if $p_n = \frac12$ for every $n,$ then for $n \geq 2$ (using the notation where $s_1=1$ and player $1$'s probability of survival is $s_{k+1}$)
$$ s_n = \frac23 \left(1 - \left(-\frac12\right)^n \right). $$
More generally, if $p_n = p,$ the same $p$ for every $p_n,$ then for $n \geq 2,$ $$ s_n = \frac1{1+p} \left(1 - \left(-p\right)^n \right). $$