# Spinners from yesteryear: A challenging probability problem

While browsing the Internet I found an old horse racing game where the results were determined by a spinner. The names of 6 different horses were listed an equal number of times on the spinner. Each time the spinner landed on a particular horse, you moved that horse forward 1 space. The first horse to move 5 spaces, won the race.

It was obvious that each horse had an equal probability of winning. I wondered, though, what would happen if we weighted each horse differently, say p1,p2,...,p6, where p1+p2+...+p6 = 1. With this in mind, how would these weightings relate to their probability of winning the race? The problem is, to me at least, difficult. I simulated a few "races" as an example:

Race 1: p = [p1,p2,...,p6] = [50,10,10,10,10,10] --> Total wins for each horse from 100,000 simulations = [95928,831,776,839,825,801]

Race 2: p= [50,30,5,5,5,5] --> [78231,21636,29,43,30,31]

You get the idea. So the question is given an initial set of probabilities for each of the 6 horses, what are the final "winning" probabilities?

Is there a formula (complicated or not) that describes this?

Thanks to everyone who gives it a shot!

• I suspect that the expected number of rolls needed for each horse to move 5 spaces would be useful. Commented May 16, 2014 at 22:21

The following analysis gives a hideous formula that involves a nested sum of products. Perhaps someone else will be able to give a simplification.

Suppose one plays the above game with six horses, $h_0, h_1, \ldots, h_5$. At each time step the probability of horse $h_i$ advancing one step is $p_i \geq 0$ with $\sum_{i=0}^{5}p_i = 1$. Let's first consider the case where we spin the wheel $m$ times and record how far each horse has advanced. In this case we don't stop when a horse has advanced $5$ steps.

The vector $(k_0, k_1, \ldots, k_5)$ of steps advanced by each horse follows a multinomial distribution. The probability mass function in this case is given by $$P(k_0, k_1,\ldots, k_5) = \left\{ \begin{array}{cc}{m \choose k_0, k_1, k_2, k_3, k_4, k_5}p_0^{k_0}p_1^{k_1}p_2^{k_2}p_3^{k_3}p_4^{k_4}p_5^{k_5} & \sum_{i=0}^{5}k_i = m\\ 0 & \text{otherwise} \end{array} \right.$$

Now suppose instead we spin until $h_0$ advances $5$ steps. In this case the vector $(k_1, k_2, k_3, k_4, k_5)$ of steps advanced by the other $5$ horses will follow a negative multinomial distribution. The probability mass function is given by $$P(k_1,k_2,k_3,k_4,k_5) = \Gamma\left(5+\sum_{i=1}^5k_i\right)\frac{p_0^{5}} {4!}\prod_{i=1}^{5}\frac{p_i^{k_i}}{k_i !}$$

Where we use the gamma function, to simplify notation. For natural numbers $n$, $\Gamma(n) = (n-1)!$.

Now $h_0$ will have won the associated game if and only if $k_i < 5$ for $1 \leq i \leq 5$. Thus $$P(h_0 \text{ wins}) = \frac{p_0^5}{4!}\sum_{ k_1 = 0}^4\sum_{k_2=0}^4\sum_{k_3=0}^4\sum_{k_4=0}^4\sum_{k_5=0}^4 \Gamma\left(5+\sum_{i=1}^5k_i\right)\prod_{i=1}^5\frac{p_i^{k_i}}{k_i!}$$

The same reasoning allows us to get the probabilities of the other horses winning, since our numbering of the horses was arbitrary. This result can be generalized to any number of horses and any number of steps needed to win.

(I assume here that each successful spin equals a step toward the horse's victory.)

Reading your problems, I thought it had traces of a multinomial distribution and traces of a negative binomial distribution. So I asked Google, and it confirmed my suspicions: There is such a thing as a negative multinomial distribution. The Wikipedia page doesn't look immediately helpful, and I prefer figuring things out on my own anyway, so that's what I did.

However, to make this somewhat more tractable, I made it a smaller problem. Using this method — and I'll attempt to generalize a bit at the end — you should be able to work through your specific question, assuming you have the patience :).

So. Assume there are three horses, $H_1, \, H_2, \, H_3$, that have probabilities of winning $p_1 = 1/2, \, p_2 = 3/10, \, p_3 = 1/5$. Furthermore, a horse needs three spins to win.

Let's say we want to know the probability that $H_1$ wins. The game must last a minimum of three turns and a maximum of seven (two spins for each horse, with the final spin going to $H_1$). Therefore, we must find the probability of each possible game and add those probabilities together. So here are the possibilities (with order ignored for now):

• $H_1, \, H_1, \, H_1$
• $H_1, \, H_1, \, H_1, \, H_2$
• $H_1, \, H_1, \, H_1, \, H_3$
• $H_1, \, H_1, \, H_1, \, H_2, \, H_2$
• $H_1, \, H_1, \, H_1, \, H_3, \, H_3$
• $H_1, \, H_1, \, H_1, \, H_2, \, H_3$
• $H_1, \, H_1, \, H_1, \, H_2, \, H_2, \, H_3$
• $H_1, \, H_1, \, H_1, \, H_2, \, H_3, \, H_3$
• $H_1, \, H_1, \, H_1, \, H_2, \, H_2, \, H_3, \, H_3$

In order to count the number of ways to get each outcome, accounting for the different orderings, we need multinomial coefficients, the generalization of binomial coefficients, where

$$\binom{n}{k_1, k_2, \ldots k_t} = \frac{n!}{k_1!k_2!\ldots k_t!}$$

and $k_1 + k_2 + \ldots k_t = n$. If $A$, then, is any of the above outcomes, it will have a probability of the form

$$P(A) = \binom{n-1}{2, b, c}(1/2)^3 (3/10)^b (1/5)^c$$

where $n$ is the number of spins required for $H_1$ to win. Why have $n-1$ in the multinomial coefficient? Because the position of the last spin is determined: By necessity, it comes last. Therefore, we are counting the arrangements of everything before the final spin.

So what's the probability that $H_1$ wins?

\begin{aligned} \ P(H_1) =& \binom{3}{2,0,0}(1/2)^3 + \binom{3}{2,1,0}(1/2)^3(3/10) + \binom{3}{2,0,1}(1/2)^3(1/5)\\ \ & + \binom{4}{2,2,0}(1/2)^3(3/10)^2 + \binom{4}{2,0,2}(1/2)^3 (1/5)^2 \\ \ & + \binom{4}{2,1,1}(1/2)^3 (3/10) (1/5) \\ \ & + \binom{5}{2,2,1}(1/2)^3 (3/10)^2 (1/5) + \binom{5}{2,1,2}(1/2)^3 (3/10)(1/5)^2 \\ \ & + \binom{6}{2,2,2}(1/2)^3 (3/10)^2 (1/5)^2 \\ \ =& \frac{1}{8}\left(1 + \frac{9}{10} + \frac{3}{5} + \frac{18}{25} + \frac{6}{25} + \frac{27}{50} + \frac{27}{50} + \frac{9}{25} + \frac{81}{250} \right) \\ \ =& 0.653 \\ \end{aligned}

(Edit forthcoming with general info.)

I'm assuming Albert's post below (which remained hidden until I posted) says pretty much the same thing, but the general form I came up with looked a little different. (It's a bit hand-wavey, though.)

So. Let there by $t$ horses, $H_1, \, H_2, \, \ldots H_t$, with probabilities of winning $p_1, \, p_2, \, \ldots p_t$. A horse needs $w$ spins to win. Then the probability that $H_i$ wins is

$$\displaystyle{P(H_i) = p_i^w \sum_{n=w-1, k_i = w - 1, k_j < w}^{wt-(t-1)} \binom{n}{k_1, \ldots, k_i, \ldots k_t}p_1^{k_1}\ldots p_{i-1}^{k_{i-1}} p_{i+1}^{k_{i+1}} \ldots p_t^{k_t} }$$

where $i \neq j$.

I think this is true :).

• I checked. If I'm interpreting your sum correctly your formula works out to be the same as mine. Good job. Commented May 17, 2014 at 1:11