Probability – Expected Number of Wins in a Game

probabilitystatistics

Let's imagine a two player game where a player rolls a dice and then can keep the first score or decide to re-roll to get his/her final score.

Is there a general formula for the average expected number of points against a player who does the 'common sense' thing and re-rolls if they get less than $\frac{n}{2}+1$, where $n$ is the dice size. Each player fixes their re-roll value before the game, it is then unchanged.

e.g. 6 sided dice, 3 example games (…means re-rolls and uses second roll). player 1 re-rolls if the score is less than 4, r(1)=4. player 2 re-rolls if the score is less than 5, r(2)=5.

game 1) player 1 rolls 2 ….5 player 2 rolls 3 …1 result (5,1) 1 point to player 1

game 2) player 1 rolls 4. Player 2 rolls 4…5 result (4,5) 1 point to player 2

game 3) player 1 rolls 6 . Player 2 rolls 3 …6 result (6,6) 0.5 points to both players

Average score $1.5/3=0.5$ for each player


The work done so far is in the answer section below, but it would be interesting if a general result for the expected average points could be found, in terms of the dice size $n$, and re-roll if the score is less than $r_1$ for player 1 and $r_2$ for player 2.

Best Answer

Because the players don't see each other's actions, this is actually a single player game with 2 different strategies. The common sense first strategy is to re-roll if the first roll's value, 1 to $n$, was $<1+n/2$. The second, generalized strategy tries to maximize the expectation value (EV) and re-rolls if the first value was $<t+n/2$ searching for a better threshold $t$.

For even $n$, the face values $(f_1)$ for games with one roll are (t+n/2), (t+1+n/2), .. (n), each with probability $1/n$, $n\ge 2t$. The face values $(f_1,f_2)$ for games with two rolls are (1,1), (1,2), .. (1,n), (2,1), (2,2), ... (2,n), .. (n/2+t-1,1), (n/2+t-1,2), .. (n/2+t-1,n) each with probability $1/n^2$, $n\ge 4-2t$. So the EV of the strategy is $$ \frac{1}{n}(t+\frac{n}{2}+t+1+\frac{n}{2}+\cdots +n) +\frac{1}{n^2}(1+2+\cdots +n+1+2+\cdots +n+) $$ $$ =\frac{1}{n}\cdot \frac{(n+2-2t)(3n+2t)}{8} +\frac{1}{n^2}(\frac{n}{2}+t-1)(1+2+\cdots +n) $$ $$ =\frac{(3n+2t)(n+2-2t)}{8n} +\frac{1}{n^2}(\frac{n}{2}+t-1)\frac{n(n+1)}{2} =(5n^2+4n-4t^2+8t-4)/(8n) $$ for even $n$, $n\ge \max(2t,4-2t)$. The same calculation for the first strategy for odd $n$: The face values $(f_1)$ for one roll
are (t+(n+1)/2), (t+1+(n+1)/2), .. (n), each with probability $1/n$, $n\ge 2t+1$. The face values for two rolls are (1,1), (1,2), .. (1,n), (2,1), (2,2), ... (2,n), .. ((n+1)/2+t-1,1), ((n+1)/2+t-1,2), .. ((n+1)/2+t-1,n) with probability $1/n^2$, $n\ge 3-2t$. So the EV of the strategy is $$ \frac{1}{n}(t+\frac{n+1}{2}+t+1+\frac{n+1}{2}+\cdots +n) +\frac{1}{n^2}(1+2+\cdots +n+1+2+\cdots +n+) $$ $$ =\frac{1}{n}\cdot \frac{(3n+1+2t)(n+1-2t)}{8} +\frac{1}{n^2}(\frac{n+1}{2}+t-1)(1+2+\cdots +n) $$ $$ =\frac{(3n+1+2t)(n+1-2t)}{8n} +\frac{1}{n^2}(\frac{n+1}{2}+t-1)\frac{n(n+1)}{2} =\frac{5n^2+4n-1-4t^2+4t}{8n} $$ for odd $n\ge \max(2t+1,3-2t)$. By numerical evaluation one sees that the highest EV are for $t=1$ if $n$ is even, and that the highest (same) EV are for $t=0$ and $t=1$ if $n$ is odd. Explicitly for $n=1,2,3,4,...$ these are 1, 7/4, 7/3, 3, 18/5, 17/4, 34/7, 11/2, 55/9, 27/4,...

One can split this statistics by providing a probability $p_t(s)$ of scoring $s$ for the single user game. For even $n$, scores $s=1,2,...,t+n/2-1$ are achieved having rolled twice: probability of the first (discarded) score is $(t+n/2-1)/n$ and probability of the final score is $1/n$, in succession $(t+n/2-1)/n\times(1/n)$. Scores $s=t+n/2,t+n/2+1,..n$ are reached by either rolling once (probability $1/n$) or rolling twice, probability $(t+n/2-1)/n \times (1/n)$, total $[(t+n/2-1)/n+1]/n$. The probability $(t+n/2-1)/n$ means zero in all expressions if the value is negative and 1 if the value is larger than 1, effectively
$$ q_t(n) \equiv \min(\max( \frac{t+\lfloor(n+1)/2\rfloor-1)}{n},0),1) , $$ $$ q_r(n) \equiv \min(\max(\frac{r-1}{n},0),1) . $$ For odd $n$ scores $s=1,2,..., t+(n+1)/2-1$ are achieved having rolled twice: probability of the first (discarded) score $(t+(n+1)/2-1)/n$ and $1/n$ of the second, in succession $(t+(n+1)/2-1)/n\times(1/n)$. Scores $s=t+(n+1)/2,...,n$ have probability $[(t+(n+1)/2-1)/n+1]/n$, with equivalent interpretation/clipping of $[t+(n+1)/2-1]/n$.

$$ p_t(s) = q_t(n)/n\wedge 1\le s \le t+\lfloor(n+1)/2\rfloor-1 , $$ $$ p_r(s) = q_r(n)/n\wedge 1\le s \le r-1 $$ and $$ p_t(s) = q_t(n)/n+1/n\wedge t+\lfloor(n+1)/2\rfloor \le s \le n. $$ $$ p_r(s) = q_r(n)/n+1/n\wedge r \le s \le n. $$ For the 2 player game one must "convolve" these two distributions (with 2 different $t_1$, $t_2$ of the two players) and (say) 1 for each win of player 1 to compute a probability that player 1 wins. In detail: A $n\times n$ matrix tableau for rows of the scores $s$ of the first player and columns for the scores $s$ of the second player contains the products $p_{t_1}(s_1)p_{t_2}(s_2)$, the probability of the joined outcome; one must basically weigh these products by $1/2$ on the diagonal (draws of the game), weigh them by 1 in the lower left triangular area (where 1 wins) and by 0 in the upper right area (where 1 loses). The winning probability for player 1 is $$ P = \sum_{{s_1}=1}^n \sum_{s_2=1}^{s_1-1} p_{t_1}(s_1)p_{t_2}(s_2) +\frac12 \sum_{{s_1}=1}^n p_{t_1}(s_1)p_{t_2}(s_1) $$ $$ = \sum_{{s_1}=1}^n \sum_{s_2=1}^{s_1-1} p_{r_1}(s_1)p_{r_2}(s_2) +\frac12 \sum_{{s_1}=1}^n p_{r_1}(s_1)p_{r_2}(s_1). $$