Probability that these characters win a game.

Let $p_k$ be the probability that you roll a $k$. For example, $p_7=6/36$. I assume you're able to calculate these.

We are only interested in a pairwise probability of winning, so let's calculate the probability that $A \in \{2,\dots,12\}$ wins vs $B \in \{2,\dots,12\}$. (For example, $A=7, B=6$.) When analyzing this game, we only care about the rolls that come up $A$ and $B$, all others can be ignored. We'll define the conditional probabilities given $A$ or $B$ was rolled. $$ r_A = \frac{p_A}{p_A+p_B} \qquad r_B = \frac{p_B}{p_A+p_B} $$

Define $f(u, v)$ as the probability that $A$ wins when $A$ is $u$ steps away from the finish, and $B$ is $v$ steps away from the finish. The aim is to calculate $f(n, n)$.

Consider the state $(u,v)$. If we roll an $A$, we go to state $(u-1,v)$. If we roll a $B$, we go to state $(u,v-1)$. Thus, we can write the following relationship for $f$: $$ f(u,v) = \begin{cases} r_Af(u-1,v)+r_Bf(u,v-1) & \text{if } u \geq 1, v \geq 1 \\ 1 & \text{if } u = 0 \\ 0 & \text{if } v = 0 \end{cases} $$ So the goal now is to solve this recurrence relation. I solved it by writing it out for low values of $u$ and $v$. (There is probably a more clever way to do it.) $$ f(u,v) = \begin{cases} r_A^u\left[ 1 + \sum_{i=1}^{v-1}\left[ \left(\prod_{j=0}^{i-1} (u+j)\right)\frac{1}{i!}r_B^i \right] \right] & \text{if } u \geq 0, v \geq 2 \\ r_A^u & \text{if } u \geq 0, v = 1 \\ 0 & \text{if } u \geq 0, v = 0 \\ \end{cases} $$ You can prove this by induction. I will leave it as an exercise for the reader.

Here is the table of probabilities for $A=7, B=6$. $u$ goes across the columns, $v$ goes down the rows. $f(n,n)$ are on the diagonals. For example, $A$ has a 72% chance to win when $n=20$.

enter image description here

Plotting $f(n,n)$ we can see that as expected, the probability that $7$ wins goes to 1.

enter image description here

Tags:

Probability